From 211066ec7b461826d90a719b022a17db674c3ab2 Mon Sep 17 00:00:00 2001 From: Simon Fondrie-Teitler Date: Sat, 9 Aug 2025 15:18:04 -0400 Subject: [PATCH] Record last attempt time when notification connection fails --- daemon/src/notifications.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemon/src/notifications.rs b/daemon/src/notifications.rs index cf39dbd..5c5b3a6 100644 --- a/daemon/src/notifications.rs +++ b/daemon/src/notifications.rs @@ -128,6 +128,7 @@ pub fn run_notification_worker( Err(e) => { error!("Failed to send notification to ntfy: {e}"); notification.failed_since_last_success += 1; + notification.last_attempt = Some(Instant::now()); } } } @@ -135,7 +136,7 @@ pub fn run_notification_worker( tokio::time::sleep(Duration::from_secs(2)).await; } } - // If there's no channel name we'll just discard the notifications + // If there's no url to send to we'll just discard the notifications else { loop { if notification_service.rx.recv().await.is_none() {