i am trying to do some error handling in a celery workflow containing groups and chains. The following example code describes the situation:
from .tasks import task_1, task_2, task_3, task_4, task_finalize, handle_error
chain_1 = (task_1 | task_2)
chain_2 = (task_1 | task_2)
finalize_group = group([task_finalize, task_finalize])
group_of_chains = group([chain_1, chain_2])
# Definition of the final workflow
workflow = (chord(group_of_chains, task_3.on_error(handle_error)) | task_4 | finalize_group)
I only want to handle the first raised exception in "group_of_chains". According to the official celery docs here, i have to use the on_error() method of the chord body (task_3), but handle_error is not executed at all. Any idea what i am missing?