mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-06 13:34:13 +03:00
remove hasattr check
This commit is contained in:
parent
3b50c087e6
commit
b70da83113
@ -61,7 +61,7 @@ class BaseLocalDetector(ObjectDetector):
|
|||||||
|
|
||||||
self.detect_api = create_detector(detector_config)
|
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:
|
if hasattr(self.detect_api, "set_stop_event") and stop_event:
|
||||||
self.detect_api.set_stop_event(stop_event)
|
self.detect_api.set_stop_event(stop_event)
|
||||||
|
|
||||||
@ -299,9 +299,7 @@ class AsyncDetectorRunner(FrigateProcess):
|
|||||||
t_detect.join(timeout=5)
|
t_detect.join(timeout=5)
|
||||||
t_result.join(timeout=5)
|
t_result.join(timeout=5)
|
||||||
|
|
||||||
# Explicitly shutdown MemryX accelerator
|
# Shutdown the AsyncDetector
|
||||||
if hasattr(self._detector.detect_api, "shutdown"):
|
|
||||||
logger.info("Calling MemryX shutdown method...")
|
|
||||||
self._detector.detect_api.shutdown()
|
self._detector.detect_api.shutdown()
|
||||||
|
|
||||||
self._publisher.stop()
|
self._publisher.stop()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user