ensure semantic search is enabled before updating embeddings stats

This commit is contained in:
Josh Hawkins 2025-03-29 06:54:52 -05:00
parent 4aa493b96c
commit 4613f0ccda

View File

@ -235,9 +235,11 @@ class EmbeddingMaintainer(threading.Thread):
if not camera or source_type != EventTypeEnum.tracked_object: if not camera or source_type != EventTypeEnum.tracked_object:
return return
camera_config = self.config.cameras[camera] if self.config.semantic_search.enabled:
self.embeddings.update_stats() self.embeddings.update_stats()
camera_config = self.config.cameras[camera]
# no need to process updated objects if face recognition, lpr, genai are disabled # no need to process updated objects if face recognition, lpr, genai are disabled
if not camera_config.genai.enabled and len(self.realtime_processors) == 0: if not camera_config.genai.enabled and len(self.realtime_processors) == 0:
return return