diff --git a/apps/monitor/src/runner.rs b/apps/monitor/src/runner.rs index 79b1da1..2c67724 100644 --- a/apps/monitor/src/runner.rs +++ b/apps/monitor/src/runner.rs @@ -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, Vec)>(); - 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));