From 678f1201c6e6b9178f7d36b5a00eea143c329575 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 18 Nov 2023 15:36:13 -0600 Subject: [PATCH] use timeout for move queues (#8662) --- frigate/ptz/autotrack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/ptz/autotrack.py b/frigate/ptz/autotrack.py index 4bca8be47..b5aee57dc 100644 --- a/frigate/ptz/autotrack.py +++ b/frigate/ptz/autotrack.py @@ -589,7 +589,10 @@ class PtzAutoTracker: camera_config.frame_shape[0] while not self.stop_event.is_set(): - move_data = self.move_queues[camera].get() + try: + move_data = self.move_queues[camera].get(True, 0.1) + except queue.Empty: + continue with self.move_queue_locks[camera]: frame_time, pan, tilt, zoom = move_data