From b70da831137c4c3f63cf6a8e588925df10240047 Mon Sep 17 00:00:00 2001 From: Abinila Siva Date: Tue, 25 Nov 2025 12:00:24 -0500 Subject: [PATCH] remove hasattr check --- frigate/object_detection/base.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frigate/object_detection/base.py b/frigate/object_detection/base.py index 00ea55740..d2a54afbc 100644 --- a/frigate/object_detection/base.py +++ b/frigate/object_detection/base.py @@ -61,7 +61,7 @@ class BaseLocalDetector(ObjectDetector): self.detect_api = create_detector(detector_config) - # If the detector supports setting stop_event, provide it + # If the detector supports stop_event, pass it if hasattr(self.detect_api, "set_stop_event") and stop_event: self.detect_api.set_stop_event(stop_event) @@ -299,10 +299,8 @@ class AsyncDetectorRunner(FrigateProcess): t_detect.join(timeout=5) t_result.join(timeout=5) - # Explicitly shutdown MemryX accelerator - if hasattr(self._detector.detect_api, "shutdown"): - logger.info("Calling MemryX shutdown method...") - self._detector.detect_api.shutdown() + # Shutdown the AsyncDetector + self._detector.detect_api.shutdown() self._publisher.stop() except Exception as e: