From 5176c05e2e8e66b5d59781aee18f05fffcd58703 Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 3 Feb 2023 18:30:11 -0600 Subject: [PATCH] dont wait so long for queues --- frigate/events.py | 2 +- frigate/object_detection.py | 2 +- frigate/object_processing.py | 2 +- frigate/output.py | 2 +- frigate/video.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frigate/events.py b/frigate/events.py index 5f30f8633..f502c4ded 100644 --- a/frigate/events.py +++ b/frigate/events.py @@ -67,7 +67,7 @@ class EventProcessor(threading.Thread): while not self.stop_event.is_set(): try: - event_type, camera, event_data = self.event_queue.get(timeout=10) + event_type, camera, event_data = self.event_queue.get(timeout=1) except queue.Empty: continue diff --git a/frigate/object_detection.py b/frigate/object_detection.py index 2fc080329..be5fc36f5 100644 --- a/frigate/object_detection.py +++ b/frigate/object_detection.py @@ -104,7 +104,7 @@ def run_detector( while not stop_event.is_set(): try: - connection_id = detection_queue.get(timeout=5) + connection_id = detection_queue.get(timeout=1) except queue.Empty: continue input_frame = frame_manager.get( diff --git a/frigate/object_processing.py b/frigate/object_processing.py index 5477f57b9..97ef6f1ef 100644 --- a/frigate/object_processing.py +++ b/frigate/object_processing.py @@ -901,7 +901,7 @@ class TrackedObjectProcessor(threading.Thread): current_tracked_objects, motion_boxes, regions, - ) = self.tracked_objects_queue.get(True, 10) + ) = self.tracked_objects_queue.get(True, 1) except queue.Empty: continue diff --git a/frigate/output.py b/frigate/output.py index 9f02a7afd..b03599f18 100644 --- a/frigate/output.py +++ b/frigate/output.py @@ -463,7 +463,7 @@ def output_frames(config: FrigateConfig, video_output_queue): current_tracked_objects, motion_boxes, regions, - ) = video_output_queue.get(True, 10) + ) = video_output_queue.get(True, 1) except queue.Empty: continue diff --git a/frigate/video.py b/frigate/video.py index f733bb357..1c20c26d3 100755 --- a/frigate/video.py +++ b/frigate/video.py @@ -601,7 +601,7 @@ def process_frames( break try: - frame_time = frame_queue.get(True, 10) + frame_time = frame_queue.get(True, 1) except queue.Empty: continue