mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-09-10 17:51:45 +02:00
Set stop event first (#16466)
This commit is contained in:
parent
9a0211a71c
commit
ac3dfbc30d
@ -39,6 +39,7 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
|
|
||||||
def __init__(self, config: FrigateConfig, stop_event: MpEvent) -> None:
|
def __init__(self, config: FrigateConfig, stop_event: MpEvent) -> None:
|
||||||
self.config = config
|
self.config = config
|
||||||
|
self.stop_event = stop_event
|
||||||
self.claim_headers: dict[str, dict[str, str]] = {}
|
self.claim_headers: dict[str, dict[str, str]] = {}
|
||||||
self.refresh: int = 0
|
self.refresh: int = 0
|
||||||
self.web_pushers: dict[str, list[WebPusher]] = {}
|
self.web_pushers: dict[str, list[WebPusher]] = {}
|
||||||
@ -51,7 +52,6 @@ class WebPushClient(Communicator): # type: ignore[misc]
|
|||||||
target=self._process_notifications, daemon=True
|
target=self._process_notifications, daemon=True
|
||||||
)
|
)
|
||||||
self.notification_thread.start()
|
self.notification_thread.start()
|
||||||
self.stop_event = stop_event
|
|
||||||
|
|
||||||
if not self.config.notifications.email:
|
if not self.config.notifications.email:
|
||||||
logger.warning("Email must be provided for push notifications to be sent.")
|
logger.warning("Email must be provided for push notifications to be sent.")
|
||||||
|
Loading…
Reference in New Issue
Block a user