mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-10-24 07:24:42 +03:00
Refactor Notices and System Health pane (#24243)
* refactor notices * show startup message for enrichments in health pane * tweaks
This commit is contained in:
committed by
Nicolas Mowen
parent
5cef6823a6
commit
7bc32fd4c9
@@ -357,20 +357,7 @@ class Dispatcher:
|
||||
return
|
||||
|
||||
try:
|
||||
action = payload.get("action")
|
||||
kind = payload.get("kind")
|
||||
scope = payload.get("scope")
|
||||
|
||||
if not isinstance(kind, str):
|
||||
logger.warning("Ignoring notice update without a kind")
|
||||
elif action == "raise":
|
||||
self.notice_registry.raise_notice(
|
||||
kind, scope=scope, params=payload.get("params") or {}
|
||||
)
|
||||
elif action == "resolve":
|
||||
self.notice_registry.resolve(kind, scope)
|
||||
else:
|
||||
logger.warning("Ignoring notice update with action %s", action)
|
||||
self.notice_registry.apply(payload)
|
||||
except Exception:
|
||||
# a raise here would kill the REP thread for every process
|
||||
logger.exception("Failed to apply notice update")
|
||||
|
||||
Reference in New Issue
Block a user