more timing tweaks
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -8,7 +8,7 @@ enum SaveMessage {
|
||||
}
|
||||
|
||||
async fn produce_soft_saves(tx: async_channel::Sender<SaveMessage>) {
|
||||
let secs = 30;
|
||||
let secs = 25;
|
||||
|
||||
let duration = Duration::from_secs(secs);
|
||||
let mut interval = tokio::time::interval(duration);
|
||||
@@ -22,7 +22,7 @@ async fn produce_soft_saves(tx: async_channel::Sender<SaveMessage>) {
|
||||
}
|
||||
|
||||
async fn produce_hard_saves(tx: async_channel::Sender<SaveMessage>) {
|
||||
let secs = 200;
|
||||
let secs = 190;
|
||||
|
||||
let duration = Duration::from_secs(secs);
|
||||
let mut interval = tokio::time::interval(duration);
|
||||
@@ -77,8 +77,9 @@ async fn do_soft_save_with_announcement() {
|
||||
}
|
||||
|
||||
async fn do_hard_save_with_announcement() {
|
||||
let ten_seconds = Duration::from_secs(10);
|
||||
let duration = ten_seconds;
|
||||
let two_seconds = Duration::from_secs(2);
|
||||
let eight_seconds = Duration::from_secs(8);
|
||||
let duration = eight_seconds;
|
||||
let delay = tokio::spawn(sleep(duration));
|
||||
|
||||
println!("Hard saving...");
|
||||
@@ -93,6 +94,8 @@ async fn do_hard_save_with_announcement() {
|
||||
|
||||
delay.await.unwrap();
|
||||
|
||||
sleep(two_seconds).await;
|
||||
|
||||
run_rcon_command(["save-all", "flush"]).await;
|
||||
|
||||
run_rcon_command([
|
||||
|
Reference in New Issue
Block a user