mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-04-30 19:36:24 +00:00
Update notification service
This commit is contained in:
@@ -251,7 +251,7 @@ class TelegramChannel(NotificationChannel):
|
|||||||
.replace('>', '>'))
|
.replace('>', '>'))
|
||||||
|
|
||||||
|
|
||||||
# ─── Gotify ──────────────────────────────────────────────────────
|
# ─── Gotify ───────────────────────────────────────<EFBFBD><EFBFBD>──────────────
|
||||||
|
|
||||||
class GotifyChannel(NotificationChannel):
|
class GotifyChannel(NotificationChannel):
|
||||||
"""Gotify push notification channel with priority mapping."""
|
"""Gotify push notification channel with priority mapping."""
|
||||||
|
|||||||
@@ -218,6 +218,11 @@ class _StartupGraceState:
|
|||||||
with self._lock:
|
with self._lock:
|
||||||
return self._startup_aggregated
|
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 ──────────────────────────────────────
|
# ─── Module-level convenience functions ──────────────────────────────────────
|
||||||
|
|
||||||
@@ -264,6 +269,14 @@ def was_startup_aggregated() -> bool:
|
|||||||
"""Check if startup aggregation has already been processed."""
|
"""Check if startup aggregation has already been processed."""
|
||||||
return _state.was_startup_aggregated()
|
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:
|
def is_real_system_boot() -> bool:
|
||||||
"""
|
"""
|
||||||
Check if this is a real system boot (not just a service restart).
|
Check if this is a real system boot (not just a service restart).
|
||||||
|
|||||||
Reference in New Issue
Block a user