nit tracing

This commit is contained in:
Ruben Fiszel
2026-02-12 20:55:25 +00:00
parent bba95ad4b4
commit 4cdc3e9f7c
+15 -9
View File
@@ -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?}");
}
},
}