added debugging for metrics collection

This commit is contained in:
2025-08-09 19:52:21 +02:00
parent f997ba385b
commit a1bbbedd75

View File

@@ -21,8 +21,12 @@ impl Collector {
} }
} }
pub async fn run(&mut self, base_url: &str) -> anyhow::Result<(), Box<dyn Error>> { pub async fn run(&mut self, base_url: &str) -> Result<(), Box<dyn Error>> {
loop { loop {
println!(
"[{}] Starting metrics collection...",
chrono::Local::now().format("%H:%M:%S")
);
let metrics = self.collect().await?; let metrics = self.collect().await?;
api::send_metrics(base_url, &metrics).await?; api::send_metrics(base_url, &metrics).await?;
tokio::time::sleep(Duration::from_secs(20)).await; tokio::time::sleep(Duration::from_secs(20)).await;