From 559e6910c4c85fad13409ace04fedf92cc05d38a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 27 Mar 2024 09:03:13 -0600 Subject: [PATCH] Improve restart timing (#10709) --- frigate/app.py | 10 +++++----- frigate/output/output.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frigate/app.py b/frigate/app.py index 2b1198278..78a2b0132 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -666,6 +666,11 @@ class FrigateApp: logger.info("Stopping...") self.stop_event.set() + # Stop Communicators + self.inter_process_communicator.stop() + self.inter_config_updater.stop() + self.inter_detection_proxy.stop() + for detector in self.detectors.values(): detector.stop() @@ -702,8 +707,3 @@ class FrigateApp: queue.get_nowait() queue.close() queue.join_thread() - - # Stop Communicators - self.inter_process_communicator.stop() - self.inter_config_updater.stop() - self.inter_detection_proxy.stop() diff --git a/frigate/output/output.py b/frigate/output/output.py index 348d4ba7a..88164d45a 100644 --- a/frigate/output/output.py +++ b/frigate/output/output.py @@ -79,7 +79,7 @@ def output_frames( websocket_thread.start() while not stop_event.is_set(): - (topic, data) = detection_subscriber.get_data(timeout=10) + (topic, data) = detection_subscriber.get_data(timeout=1) if not topic: continue