update notification service

This commit is contained in:
MacRimi
2026-03-25 23:13:11 +01:00
parent 92c0e6ff09
commit cdc2d7bbcb
6 changed files with 15 additions and 5 deletions

View File

@@ -876,6 +876,10 @@ def _health_collector_loop():
'updates': 'System Updates',
'security': 'Security',
}
# Categories to suppress during startup grace period (transient issues)
_STARTUP_GRACE_CATEGORIES = {'storage', 'vms', 'network', 'services'}
_STARTUP_GRACE_SECONDS = 300 # 5 minutes
_collector_start_time = time.time()
while True:
try:
@@ -933,6 +937,12 @@ def _health_collector_loop():
skip_notification = True
break
# Startup grace period: skip transient issues from categories
# that typically need time to stabilize after boot
in_grace_period = (time.time() - _collector_start_time) < _STARTUP_GRACE_SECONDS
if in_grace_period and cat_key in _STARTUP_GRACE_CATEGORIES:
skip_notification = True
if not skip_notification:
degraded.append({
'category': cat_name,