diff --git a/frigate/util.py b/frigate/util.py index 32af012e0..4b3a56671 100755 --- a/frigate/util.py +++ b/frigate/util.py @@ -636,7 +636,10 @@ def restart_frigate(): else: os.kill(os.getpid(), signal.SIGTERM) -def terminate_process(proc: sp.Popen, logger_inst: logging.Logger = None, timeout: float = 30.0): + +def terminate_process( + proc: sp.Popen, logger_inst: logging.Logger = None, timeout: float = 30.0 +): logger_inst = logger_inst or logger if proc is not None and proc.poll() == None: proc_name: str = proc.args[0] @@ -651,7 +654,6 @@ def terminate_process(proc: sp.Popen, logger_inst: logging.Logger = None, timeou proc.communicate() - class EventsPerSecond: def __init__(self, max_events=1000): self._start = None diff --git a/frigate/video.py b/frigate/video.py index a0ecba514..5fef54c9b 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -400,8 +400,8 @@ def capture_camera(name, config: CameraConfig, process_info): def run_capture(): frame_queue = process_info["frame_queue"] prev_sig = None - logger.info(f"{name}: capture starting") while prev_sig not in stop_sigs: + logger.info(f"{name}: capture starting") camera_watchdog = CameraWatchdog( name, config, @@ -426,8 +426,6 @@ def capture_camera(name, config: CameraConfig, process_info): if( prev_sig := sig_queue.get() ) in stop_sigs: break - logger.info(f"{name}: capture resuming") - # Run a background thread to prevent deadlock in signal handlers capture_thread = threading.Thread(target=run_capture) capture_thread.start()