diff --git a/backend/src/manager/mod.rs b/backend/src/manager/mod.rs index ace24a396..bc9e0e158 100644 --- a/backend/src/manager/mod.rs +++ b/backend/src/manager/mod.rs @@ -254,7 +254,7 @@ async fn run_main( .commit_health_check_results .store(true, Ordering::SeqCst); let health = async { - tokio::time::sleep(Duration::from_secs(1)).await; // only sleep for 1 second before first health check + tokio::time::sleep(Duration::from_secs(10)).await; // only sleep for 1 second before first health check loop { let mut db = state.ctx.db.handle(); if let Err(e) = health::check( @@ -488,8 +488,10 @@ async fn manager_thread_loop(mut recv: Receiver, thread_shared: &Arc chrono::Duration::from_std(Duration::from_secs(15)).unwrap() => + if cfg!(feature = "unstable") + || (Utc::now().signed_duration_since(*started) + > chrono::Duration::from_std(Duration::from_secs(60)).unwrap() + && !matches!(&*thread_shared.on_stop.borrow(), &OnStop::Exit)) => { let res = thread_shared.ctx.notification_manager .notify(