Closed
Description
openedon May 21, 2019
I have one Celery task that directly calls another, but as a function, not as a task. The first task is auto-retried for a certain set of exceptions, and the second task is retried for a different set of exceptions. Here is an example task in my actual codebase, but here is an isolated illustration of the problem.
Consider the following two tasks, bar
which is auto-retried for exceptions A
or B
, and a wrapper task bat
which is auto-retried for exceptions C
or D
.
def foo():
... # do something that might raise exception A, B, C, or D
@app.task(autoretry_for=(A, B))
def bar():
return foo()
@app.task(autoretry_for=(C, D))
def bat():
return bar()
Now invoke bat
:
bar.delay()
Now suppose that during the execution of bat
, foo()
raises exception C
. Even though Celery will retry the task, the exception C
will be reported to Sentry.
Metadata
Assignees
Type
Projects
Status
No status
Activity