Update notification service

This commit is contained in:
MacRimi
2026-02-24 19:27:43 +01:00
parent f43feb825f
commit 46c04e5a81
2 changed files with 24 additions and 12 deletions
+8
View File
@@ -653,6 +653,14 @@ class NotificationManager:
if event.severity == 'CRITICAL' and cooldown_str is None:
cooldown = 60
# Backup/replication events: each execution is unique and should
# always be delivered. A 10s cooldown prevents exact duplicates
# (webhook + tasks) but allows repeated backup jobs to report.
_ALWAYS_DELIVER = {'backup_complete', 'backup_fail', 'backup_start',
'replication_complete', 'replication_fail'}
if event.event_type in _ALWAYS_DELIVER and cooldown_str is None:
cooldown = 10
# Check against last sent time using stable fingerprint
last_sent = self._cooldowns.get(event.fingerprint, 0)