mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
Reduce recording info timeout (#8506)
* Decrease timeout * Use const for queue timeout
This commit is contained in:
parent
1d99bb908d
commit
257bd89733
@ -32,6 +32,8 @@ from frigate.util.services import get_video_properties
|
|||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
QUEUE_READ_TIMEOUT = 0.00001 # seconds
|
||||||
|
|
||||||
|
|
||||||
class SegmentInfo:
|
class SegmentInfo:
|
||||||
def __init__(
|
def __init__(
|
||||||
@ -452,7 +454,9 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
current_tracked_objects,
|
current_tracked_objects,
|
||||||
motion_boxes,
|
motion_boxes,
|
||||||
regions,
|
regions,
|
||||||
) = self.object_recordings_info_queue.get(True, timeout=0.01)
|
) = self.object_recordings_info_queue.get(
|
||||||
|
True, timeout=QUEUE_READ_TIMEOUT
|
||||||
|
)
|
||||||
|
|
||||||
if frame_time < run_start - stale_frame_count_threshold:
|
if frame_time < run_start - stale_frame_count_threshold:
|
||||||
stale_frame_count += 1
|
stale_frame_count += 1
|
||||||
@ -488,7 +492,9 @@ class RecordingMaintainer(threading.Thread):
|
|||||||
frame_time,
|
frame_time,
|
||||||
dBFS,
|
dBFS,
|
||||||
audio_detections,
|
audio_detections,
|
||||||
) = self.audio_recordings_info_queue.get(True, timeout=0.01)
|
) = self.audio_recordings_info_queue.get(
|
||||||
|
True, timeout=QUEUE_READ_TIMEOUT
|
||||||
|
)
|
||||||
|
|
||||||
if frame_time < run_start - stale_frame_count_threshold:
|
if frame_time < run_start - stale_frame_count_threshold:
|
||||||
stale_frame_count += 1
|
stale_frame_count += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user