mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
mute crash notifications when service is just started (#1245)
* mute crash notifications when service is just started * mute first service crash if within 15s of start
This commit is contained in:
@@ -7,6 +7,7 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use bollard::Docker;
|
||||
use chrono::Utc;
|
||||
use color_eyre::eyre::eyre;
|
||||
use patch_db::json_ptr::JsonPointer;
|
||||
use patch_db::{DbHandle, LockType, PatchDb, Revision};
|
||||
@@ -287,13 +288,14 @@ impl RpcContext {
|
||||
main,
|
||||
MainStatus::Stopped, /* placeholder */
|
||||
) {
|
||||
MainStatus::BackingUp { started, health } => {
|
||||
if let Some(started) = started {
|
||||
MainStatus::Running { started, health }
|
||||
MainStatus::BackingUp { started, .. } => {
|
||||
if let Some(_) = started {
|
||||
MainStatus::Starting
|
||||
} else {
|
||||
MainStatus::Stopped
|
||||
}
|
||||
}
|
||||
MainStatus::Running { .. } => MainStatus::Starting,
|
||||
a => a,
|
||||
};
|
||||
*main = new_main;
|
||||
|
||||
Reference in New Issue
Block a user