use timeout for move queues (#8662)

This commit is contained in:
Josh Hawkins 2023-11-18 15:36:13 -06:00 committed by GitHub
parent 4879de263b
commit 678f1201c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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