Format changes with Black

This commit is contained in:
Chris OBryan 2023-06-08 13:12:19 -05:00
parent ccf5250679
commit a12ccf5d6c
2 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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()