mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
fix watchdog
This commit is contained in:
parent
3e6f6edf7e
commit
6ef22cf578
@ -74,13 +74,12 @@ class CameraWatchdog(threading.Thread):
|
|||||||
print(f"Last frame for {name} is more than 30 seconds old...")
|
print(f"Last frame for {name} is more than 30 seconds old...")
|
||||||
if process.is_alive():
|
if process.is_alive():
|
||||||
process.terminate()
|
process.terminate()
|
||||||
try:
|
print("Waiting for process to exit gracefully...")
|
||||||
print("Waiting for process to exit gracefully...")
|
process.join(timeout=30)
|
||||||
process.wait(timeout=30)
|
if process.exitcode is None:
|
||||||
except sp.TimeoutExpired:
|
|
||||||
print("Process didnt exit. Force killing...")
|
print("Process didnt exit. Force killing...")
|
||||||
process.kill()
|
process.kill()
|
||||||
process.wait()
|
process.join()
|
||||||
if not process.is_alive():
|
if not process.is_alive():
|
||||||
print(f"Process for {name} is not alive. Starting again...")
|
print(f"Process for {name} is not alive. Starting again...")
|
||||||
camera_process['fps'].value = float(self.config[name]['fps'])
|
camera_process['fps'].value = float(self.config[name]['fps'])
|
||||||
|
Loading…
Reference in New Issue
Block a user