mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-04 02:05:21 +03:00
set the detection events on exit and return early from processing
This commit is contained in:
parent
426a666210
commit
600c45246b
@ -416,6 +416,11 @@ class FrigateApp:
|
||||
logger.info(f"Stopping...")
|
||||
self.stop_event.set()
|
||||
|
||||
# Set the events for the camera processor processes because
|
||||
# they may be waiting on the event coming out of the detection process
|
||||
for name in self.config.cameras.keys():
|
||||
self.detection_out_events[name].set()
|
||||
|
||||
self.dispatcher.stop()
|
||||
self.detected_frames_processor.join()
|
||||
self.event_processor.join()
|
||||
|
||||
@ -723,6 +723,9 @@ def process_frames(
|
||||
object_filters,
|
||||
)
|
||||
)
|
||||
# if frigate is exiting
|
||||
if stop_event.is_set():
|
||||
return
|
||||
|
||||
#########
|
||||
# merge objects, check for clipped objects and look again up to 4 times
|
||||
@ -787,6 +790,9 @@ def process_frames(
|
||||
refining = True
|
||||
else:
|
||||
selected_objects.append(obj)
|
||||
# if frigate is exiting
|
||||
if stop_event.is_set():
|
||||
return
|
||||
# set the detections list to only include top, complete objects
|
||||
# and new detections
|
||||
detections = selected_objects
|
||||
|
||||
Loading…
Reference in New Issue
Block a user