Propagate these errors now so they make it to the task

This commit is contained in:
shamoon committed 2026-11-14 11:51:41 -08:00
1 parent bb775a16c1
commit 6f5a192967
5 files changed
+66 -10

No files matched your search

+8 -1
View File
@@ -713,8 +713,9 @@ def run_workflows_for_documents(
logger.warning(
f"Manual workflow run requested for missing workflow {workflow_id}",
)
return
raise
failed_ids = []
for document in Document.objects.filter(
id__in=document_ids,
root_document__isnull=True,
@@ -732,10 +733,16 @@ def run_workflows_for_documents(
document=document,
)
except Exception:
failed_ids.append(document.pk)
logger.exception(
f"Error running workflow {workflow} on document {document.pk}",
)
if failed_ids:
raise RuntimeError(
f"Workflow {workflow_id} failed for document(s): {failed_ids}. Check logs for details.",
)
def update_document_parent_tags(tag: Tag, new_parent: Tag) -> None:
"""