This commit is contained in:
Josh Hawkins 2024-09-23 13:50:28 -05:00
parent 888d702460
commit f58e230122
2 changed files with 5 additions and 7 deletions

View File

@ -23,10 +23,6 @@ class EventMetadataPublisher(Publisher):
topic = topic.value
super().__init__(topic)
def publish(self, payload: str) -> None:
logger.info(f"publishing payload: {payload}")
super().publish(payload)
class EventMetadataSubscriber(Subscriber):
"""Simplifies receiving event metadata."""
@ -35,7 +31,7 @@ class EventMetadataSubscriber(Subscriber):
def __init__(self, topic: EventMetadataTypeEnum) -> None:
topic = topic.value
logger.info(f"subscribing to: {topic.value}")
logger.info(f"subscribing to: {topic}")
super().__init__(topic)
def check_for_update(

View File

@ -56,6 +56,7 @@ class EmbeddingMaintainer(threading.Thread):
def run(self) -> None:
"""Maintain a Chroma vector database for semantic search."""
logger.info("in maintainer run()")
while not self.stop_event.is_set():
self._process_updates()
self._process_finalized()
@ -149,12 +150,13 @@ class EmbeddingMaintainer(threading.Thread):
if event_id in self.tracked_events:
del self.tracked_events[event_id]
def _process_event_metadata(self, event_id):
def _process_event_metadata(self):
# Check for regenerate description requests
logger.info("processing event metadata")
(topic, event_id) = self.event_metadata_subscriber.check_for_update()
logger.info(f"in init in maintainer, {topic} {event_id}")
if not topic:
if topic is None:
return
if event_id: