mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
ensure detection_start doesnt change values between conditions
This commit is contained in:
parent
ba272fc0e8
commit
c377b0b3bc
@ -92,8 +92,9 @@ class CameraWatchdog(threading.Thread):
|
|||||||
self.plasma_process = start_plasma_store()
|
self.plasma_process = start_plasma_store()
|
||||||
|
|
||||||
# check the detection process
|
# check the detection process
|
||||||
if (self.tflite_process.detection_start.value > 0.0 and
|
detection_start = self.tflite_process.detection_start.value
|
||||||
datetime.datetime.now().timestamp() - self.tflite_process.detection_start.value > 10):
|
if (detection_start > 0.0 and
|
||||||
|
datetime.datetime.now().timestamp() - detection_start > 10):
|
||||||
print("Detection appears to be stuck. Restarting detection process")
|
print("Detection appears to be stuck. Restarting detection process")
|
||||||
self.tflite_process.start_or_restart()
|
self.tflite_process.start_or_restart()
|
||||||
elif not self.tflite_process.detect_process.is_alive():
|
elif not self.tflite_process.detect_process.is_alive():
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user