mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-05 10:45:21 +03:00
Format changes with Black
This commit is contained in:
parent
ccf5250679
commit
a12ccf5d6c
@ -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
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user