fix queues not emptying fully by changing gets to a blocking call with short timeout

This commit is contained in:
Winston Ametsitsi 2023-10-14 01:35:09 -07:00
parent fa6c6c50d0
commit 860a12ef70

View File

@ -420,7 +420,7 @@ class RecordingMaintainer(threading.Thread):
current_tracked_objects, current_tracked_objects,
motion_boxes, motion_boxes,
regions, regions,
) = self.object_recordings_info_queue.get(False) ) = self.object_recordings_info_queue.get(True, timeout=0.1)
if self.process_info[camera]["record_enabled"].value: if self.process_info[camera]["record_enabled"].value:
self.object_recordings_info[camera].append( self.object_recordings_info[camera].append(
@ -442,7 +442,7 @@ class RecordingMaintainer(threading.Thread):
camera, camera,
frame_time, frame_time,
dBFS, dBFS,
) = self.audio_recordings_info_queue.get(False) ) = self.audio_recordings_info_queue.get(True, timeout=0.1)
if self.process_info[camera]["record_enabled"].value: if self.process_info[camera]["record_enabled"].value:
self.audio_recordings_info[camera].append( self.audio_recordings_info[camera].append(