ensure cleanup runs when an event end skips post-processing

This commit is contained in:
Josh Hawkins 2026-04-27 09:32:00 -05:00
parent 18354aef6c
commit 508f4509e1

View File

@ -517,10 +517,16 @@ class EmbeddingMaintainer(threading.Thread):
try:
event: Event = Event.get(Event.id == event_id)
except DoesNotExist:
for processor in self.post_processors:
if isinstance(processor, ObjectDescriptionProcessor):
processor.cleanup_event(event_id)
continue
# Skip the event if not an object
if event.data.get("type") != "object":
for processor in self.post_processors:
if isinstance(processor, ObjectDescriptionProcessor):
processor.cleanup_event(event_id)
continue
# Extract valid thumbnail