mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
mute crash notifs during shutdown
and increase startup grace period
This commit is contained in:
committed by
Aiden McClelland
parent
2622f787fe
commit
b57f12f7ae
@@ -254,7 +254,7 @@ async fn run_main(
|
|||||||
.commit_health_check_results
|
.commit_health_check_results
|
||||||
.store(true, Ordering::SeqCst);
|
.store(true, Ordering::SeqCst);
|
||||||
let health = async {
|
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 {
|
loop {
|
||||||
let mut db = state.ctx.db.handle();
|
let mut db = state.ctx.db.handle();
|
||||||
if let Err(e) = health::check(
|
if let Err(e) = health::check(
|
||||||
@@ -488,8 +488,10 @@ async fn manager_thread_loop(mut recv: Receiver<OnStop>, thread_shared: &Arc<Man
|
|||||||
.await;
|
.await;
|
||||||
match started.as_deref() {
|
match started.as_deref() {
|
||||||
Ok(Some(MainStatus::Running { started, .. }))
|
Ok(Some(MainStatus::Running { started, .. }))
|
||||||
if Utc::now().signed_duration_since(*started)
|
if cfg!(feature = "unstable")
|
||||||
> chrono::Duration::from_std(Duration::from_secs(15)).unwrap() =>
|
|| (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
|
let res = thread_shared.ctx.notification_manager
|
||||||
.notify(
|
.notify(
|
||||||
|
|||||||
Reference in New Issue
Block a user