fix(ume): block WSS until startup REST alarm sync completes

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-06-04 21:52:39 +08:00
parent 7a729413ab
commit e62f4f2c74
3 changed files with 39 additions and 47 deletions

View file

@ -53,8 +53,8 @@ _LOOP_STATUS_COOLDOWN_S = 60.0
_WS_IGNORE_COOLDOWN_S = 60.0
# Blocks WSS connect until startup REST sync of current alarms completes (see main.on_startup).
# Default closed (clear): WSS must not write until main opens the gate after REST snapshot.
_STARTUP_ALARM_SYNC_GATE = threading.Event()
_STARTUP_ALARM_SYNC_GATE.set()
def begin_startup_alarm_sync_gate() -> None: