mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 18:55:23 +03:00
Format changes with Black
This commit is contained in:
parent
8390f054ac
commit
21f00b3858
@ -98,7 +98,7 @@ class Dispatcher:
|
|||||||
def _on_capture_command(self, camera_name: str, payload: str) -> None:
|
def _on_capture_command(self, camera_name: str, payload: str) -> None:
|
||||||
"""Callback for detect topic."""
|
"""Callback for detect topic."""
|
||||||
logger.info(f"Received capture command [{payload}] for [{camera_name}]")
|
logger.info(f"Received capture command [{payload}] for [{camera_name}]")
|
||||||
capture_proc = self.camera_metrics[camera_name]['capture_process']
|
capture_proc = self.camera_metrics[camera_name]["capture_process"]
|
||||||
|
|
||||||
# Send SIGUSR1 to resume, SIGUSR2 to pause
|
# Send SIGUSR1 to resume, SIGUSR2 to pause
|
||||||
new_state = True if payload == "ON" else False if payload == "OFF" else None
|
new_state = True if payload == "ON" else False if payload == "OFF" else None
|
||||||
|
|||||||
@ -641,7 +641,7 @@ def terminate_process(
|
|||||||
proc: sp.Popen, logger_inst: logging.Logger = None, timeout: float = 30.0
|
proc: sp.Popen, logger_inst: logging.Logger = None, timeout: float = 30.0
|
||||||
):
|
):
|
||||||
logger_inst = logger_inst or logger
|
logger_inst = logger_inst or logger
|
||||||
if proc is not None and proc.poll() == None:
|
if proc is not None and proc.poll() is None:
|
||||||
proc_name: str = proc.args[0]
|
proc_name: str = proc.args[0]
|
||||||
logger_inst.info(f"Terminating the existing {proc_name} process...")
|
logger_inst.info(f"Terminating the existing {proc_name} process...")
|
||||||
proc.terminate()
|
proc.terminate()
|
||||||
|
|||||||
@ -113,6 +113,7 @@ def create_tensor_input(frame, model_config, region):
|
|||||||
# Expand dimensions since the model expects images to have shape: [1, height, width, 3]
|
# Expand dimensions since the model expects images to have shape: [1, height, width, 3]
|
||||||
return np.expand_dims(cropped_frame, axis=0)
|
return np.expand_dims(cropped_frame, axis=0)
|
||||||
|
|
||||||
|
|
||||||
def start_or_restart_ffmpeg(
|
def start_or_restart_ffmpeg(
|
||||||
ffmpeg_cmd, logger, logpipe: LogPipe, frame_size=None, ffmpeg_process=None
|
ffmpeg_cmd, logger, logpipe: LogPipe, frame_size=None, ffmpeg_process=None
|
||||||
):
|
):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user