refactor(app): better error handling

This commit is contained in:
2025-08-09 22:42:30 +02:00
parent f3e8b01d7e
commit 12cf26d8a6
2 changed files with 16 additions and 10 deletions

View File

@@ -45,6 +45,12 @@ fn main() {
Box::new(system_monitor_adapter),
Box::new(formatter),
);
service.alert_on_threshold_violation();
service.send_all_metrics_notification();
if let Err(e) = service.alert_on_threshold_violation() {
eprintln!("Error during threshold violation check: {}", e);
}
if let Err(e) = service.send_all_metrics_notification() {
eprintln!("Error sending final notification: {}", e);
}
}