Chorehancement: move all bulk operations to async hand-off (#14773)

This commit is contained in:
shamoon authored and GitHub committed 2026-11-17 00:23:44 +00:00
1 parent 28bb63824f
commit de75249e51
39 files changed
+1633 -421

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:
"""