mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-09 13:31:14 +03:00
keep global camera config subscribers broad when only one camera exists at startup
This commit is contained in:
parent
f3a352ef3f
commit
aeeaa37f3b
@ -73,7 +73,12 @@ class CameraConfigUpdateSubscriber:
|
|||||||
|
|
||||||
base_topic = "config/cameras"
|
base_topic = "config/cameras"
|
||||||
|
|
||||||
if len(self.camera_configs) == 1:
|
# global subscribers must hear every camera; only narrow per-camera workers
|
||||||
|
is_global_subscriber = (
|
||||||
|
CameraConfigUpdateEnum.add in self.topics
|
||||||
|
or CameraConfigUpdateEnum.remove in self.topics
|
||||||
|
)
|
||||||
|
if not is_global_subscriber and len(self.camera_configs) == 1:
|
||||||
base_topic += f"/{list(self.camera_configs.keys())[0]}"
|
base_topic += f"/{list(self.camera_configs.keys())[0]}"
|
||||||
|
|
||||||
self.subscriber = ConfigSubscriber(
|
self.subscriber = ConfigSubscriber(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user