Fix: use chord.on_error before apply_async (#12842)

This commit is contained in:
shamoon
2026-05-24 14:42:11 -07:00
committed by GitHub
parent 15682231b2
commit 0a6e0db186
2 changed files with 20 additions and 6 deletions
+6 -6
View File
@@ -676,9 +676,9 @@ def split(
chord(
header=consume_tasks,
body=delete.si([doc.id]),
).apply_async(
link_error=[restore_archive_serial_numbers_task.s(backup)],
)
).on_error(
restore_archive_serial_numbers_task.s(backup),
).apply_async()
except Exception:
restore_archive_serial_numbers(backup)
raise
@@ -856,9 +856,9 @@ def edit_pdf(
chord(
header=consume_tasks,
body=delete.si([doc.id]),
).apply_async(
link_error=[restore_archive_serial_numbers_task.s(backup)],
)
).on_error(
restore_archive_serial_numbers_task.s(backup),
).apply_async()
except Exception:
restore_archive_serial_numbers(backup)
raise