cleanup: remove debug warn logs from monitor runner
This commit is contained in:
parent
6e1d642c77
commit
6b8e1fc9d9
|
|
@ -63,10 +63,8 @@ pub async fn fetch_and_run(
|
|||
};
|
||||
// Remove from in-flight before posting so a fast next cycle can pick it up
|
||||
in_flight.lock().await.remove(&monitor.id);
|
||||
warn!("posting result for {} up={}", monitor.id, result.up);
|
||||
match post_result(&client, &coordinator_url, &token, result).await {
|
||||
Ok(_) => warn!("posted result for {}", monitor.id),
|
||||
Err(e) => warn!("Failed to post result for {}: {e}", monitor.id),
|
||||
if let Err(e) = post_result(&client, &coordinator_url, &token, result).await {
|
||||
warn!("Failed to post result for {}: {e}", monitor.id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -107,7 +105,7 @@ async fn run_check(client: &reqwest::Client, monitor: &Monitor, scheduled_at: Op
|
|||
|
||||
match result {
|
||||
Err(ref e) => {
|
||||
warn!("{} check error: {e}", monitor.url);
|
||||
debug!("{} check error: {e}", monitor.url);
|
||||
PingResult {
|
||||
monitor_id: monitor.id.clone(),
|
||||
scheduled_at,
|
||||
|
|
@ -230,16 +228,13 @@ async fn run_curl(
|
|||
let tmp_owned = tmp.clone();
|
||||
|
||||
let (tx, rx) = tokio::sync::oneshot::channel::<(std::io::Result<std::process::ExitStatus>, Vec<u8>)>();
|
||||
let url_log = url.to_string();
|
||||
std::thread::spawn(move || {
|
||||
tracing::warn!("curl thread starting for {url_log}");
|
||||
let status = std::process::Command::new("curl")
|
||||
.args(&args_owned)
|
||||
.stdin(Stdio::null())
|
||||
.stdout(Stdio::null())
|
||||
.stderr(Stdio::null())
|
||||
.status();
|
||||
tracing::warn!("curl thread done for {url_log}: {:?}", status);
|
||||
let output = std::fs::read(&tmp_owned).unwrap_or_default();
|
||||
let _ = std::fs::remove_file(&tmp_owned);
|
||||
let _ = tx.send((status, output));
|
||||
|
|
|
|||
Loading…
Reference in New Issue