Update notification service

This commit is contained in:
MacRimi
2026-03-27 19:55:15 +01:00
parent 0edc2cc3af
commit 8658044c0c
2 changed files with 14 additions and 1 deletions

View File

@@ -251,7 +251,7 @@ class TelegramChannel(NotificationChannel):
.replace('>', '>'))
# ─── Gotify ─────────────────────────────────────────────────────
# ─── Gotify ───────────────────────────────────────<EFBFBD><EFBFBD>──────────────
class GotifyChannel(NotificationChannel):
"""Gotify push notification channel with priority mapping."""

View File

@@ -217,6 +217,11 @@ class _StartupGraceState:
"""Check if startup aggregation has already been processed."""
with self._lock:
return self._startup_aggregated
def mark_startup_aggregated(self) -> None:
"""Mark startup aggregation as completed without returning VMs."""
with self._lock:
self._startup_aggregated = True
# ─── Module-level convenience functions ──────────────────────────────────────
@@ -264,6 +269,14 @@ def was_startup_aggregated() -> bool:
"""Check if startup aggregation has already been processed."""
return _state.was_startup_aggregated()
def mark_startup_aggregated() -> None:
"""Mark startup aggregation as completed without processing VMs.
Use this when skipping startup notification (e.g., service restart
instead of real system boot) to prevent future checks.
"""
_state.mark_startup_aggregated()
def is_real_system_boot() -> bool:
"""
Check if this is a real system boot (not just a service restart).