mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-12 00:06:14 +00:00
nit tracing
This commit is contained in:
+15
-9
@@ -1217,11 +1217,15 @@ Windmill Community Edition {GIT_VERSION}
|
||||
last_settings_reload = Instant::now();
|
||||
}
|
||||
|
||||
if server_mode {
|
||||
if !*windmill_common::QUIET_LOGS {
|
||||
tracing::info!("monitor task started");
|
||||
}
|
||||
}
|
||||
let monitor_start = Instant::now();
|
||||
let warn_handle = if server_mode {
|
||||
Some(tokio::spawn(async move {
|
||||
tokio::time::sleep(Duration::from_secs(5)).await;
|
||||
tracing::warn!("monitor task has been running for more than 5s");
|
||||
}))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
monitor_db(
|
||||
&conn,
|
||||
&base_internal_url,
|
||||
@@ -1236,10 +1240,12 @@ Windmill Community Edition {GIT_VERSION}
|
||||
)
|
||||
.await;
|
||||
monitor_iteration += 1;
|
||||
if server_mode {
|
||||
if !*windmill_common::QUIET_LOGS {
|
||||
tracing::info!("monitor task finished");
|
||||
}
|
||||
if let Some(handle) = warn_handle {
|
||||
handle.abort();
|
||||
}
|
||||
let elapsed = monitor_start.elapsed();
|
||||
if server_mode && elapsed >= Duration::from_secs(5) {
|
||||
tracing::info!("monitor task finished in {elapsed:.1?}");
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user