Fix check

This commit is contained in:
Nick Mowen 2023-07-14 07:44:53 -06:00
parent 002e4700bc
commit 76ba6a973c
2 changed files with 8 additions and 5 deletions

View File

@ -677,7 +677,8 @@ class FrigateApp:
self.log_queue, self.log_queue,
self.inter_process_queue, self.inter_process_queue,
]: ]:
while queue and not queue.empty(): if queue is not None:
queue.get_nowait() while not queue.empty():
queue.close() queue.get_nowait()
queue.join_thread() queue.close()
queue.join_thread()

View File

@ -287,7 +287,9 @@ class RecordingMaintainer(threading.Thread):
# check if the segment shouldn't be stored # check if the segment shouldn't be stored
if ( if (
(store_mode == RetainModeEnum.motion and motion_count == 0) (store_mode == RetainModeEnum.motion and motion_count == 0)
or (store_mode == RetainModeEnum.motion and averageDBFS > 0) or (
store_mode == RetainModeEnum.motion and averageDBFS < 0
) # dBFS is stored in a negative scale
or (store_mode == RetainModeEnum.active_objects and active_count == 0) or (store_mode == RetainModeEnum.active_objects and active_count == 0)
): ):
Path(cache_path).unlink(missing_ok=True) Path(cache_path).unlink(missing_ok=True)