mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
mypy fixups
This commit is contained in:
parent
0788a1a1a4
commit
2e1e00fa38
@ -103,10 +103,11 @@ class Dispatcher:
|
||||
# Send SIGUSR1 to resume, SIGUSR2 to pause
|
||||
new_state = True if payload == "ON" else False if payload == "OFF" else None
|
||||
if new_state is not None:
|
||||
sig = signal.SIGUSR1 if new_state else signal.SIGUSR2
|
||||
self.config.cameras[camera_name].capture_enabled = new_state
|
||||
os.kill(capture_proc.pid, sig)
|
||||
self.publish(f"{camera_name}/capture/state", payload, retain=True)
|
||||
if capture_proc and capture_proc.pid:
|
||||
sig = signal.SIGUSR1 if new_state else signal.SIGUSR2
|
||||
os.kill(capture_proc.pid, sig)
|
||||
|
||||
def _on_detect_command(self, camera_name: str, payload: str) -> None:
|
||||
"""Callback for detect topic."""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user