Skip to content

Commit 07150c5

Browse files
authored
fix(v2-stable): task_done exception on dropped item (#1336)
1 parent 3e25a3c commit 07150c5

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

langfuse/_task_manager/ingestion_consumer.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,12 @@ def _truncate_item_in_place(
211211

212212
# if item does not have body or input/output fields, drop the event
213213
if "body" not in event or (
214-
"input" not in event["body"] and "output" not in event["body"]
214+
"input" not in event["body"]
215+
and "output" not in event["body"]
216+
and "metadata" not in event["body"]
215217
):
216218
self._log.warning(
217-
"Item does not have body or input/output fields, dropping item."
219+
"Item does not have body or input/output/metadata fields, dropping item."
218220
)
219221
self._ingestion_queue.task_done()
220222
return 0

0 commit comments

Comments
 (0)