update notification_manager.py

This commit is contained in:
MacRimi
2026-04-02 09:29:29 +02:00
parent a5cb01133e
commit 2072264918
2 changed files with 13 additions and 4 deletions

View File

@@ -660,9 +660,10 @@ class NotificationManager:
# Suppress VM/CT start/stop during active backups (second layer of defense).
# The primary filter is in TaskWatcher, but timing gaps can let events
# slip through. This catch-all filter checks at dispatch time.
# Exception: CRITICAL and WARNING events should always be notified.
_BACKUP_NOISE_TYPES = {'vm_start', 'vm_stop', 'vm_shutdown', 'vm_restart',
'ct_start', 'ct_stop', 'ct_shutdown', 'ct_restart'}
if event.event_type in _BACKUP_NOISE_TYPES and event.severity != 'CRITICAL':
if event.event_type in _BACKUP_NOISE_TYPES and event.severity not in ('CRITICAL', 'WARNING'):
if self._is_backup_running():
return