better error handling when genai fails

This commit is contained in:
Jason Hunter 2024-06-12 20:56:23 -04:00
parent c5a83575f0
commit a0197dce52

View File

@ -157,6 +157,10 @@ class EmbeddingMaintainer(threading.Thread):
description = self.genai_client.generate_description(thumbnails, metadata)
if description is None:
logger.debug("Failed to generate description for %s", event.id)
return
# Update the event to add the description
event.data["description"] = description
event.save()