Do flow children & parents retry when failParentOnFailure = true? #1684
Replies: 1 comment
-
hi @nggonzalez sorry for the delay, so trying to answer your questions:
when a child job has backoff strategy, before the last retry, this child will not get the failed state, it will be moved to delayed state, this image could help on understand the different paths on our states https://docs.bullmq.io/guide/architecture. In the last retry, if the child fails again, it will be moved to failed state and the parent will be moved to failed.
No, they are moved to failed directly, as those children that have failParentOnFailure = true are considered as hard dependencies. And for your last question
We should think more about it, as for now all children are consider hard dependencies, unless you have removeOnFail = true option in your children and failParentOnFailure = false, in that case the parent will be executed after the execution of all the children, but the link between the parent and their children will be lost. |
Beta Was this translation helpful? Give feedback.
-
Questions
After reading the docs and open issues, I'm still struggling to understand the following:
failParentOnFailure = true
retry before failing the parent or do they immediately fail the parent on the first failure?In addition, Is there a way to run a flow parent when there is a failure in order to capture the error state? I've referenced this issue , but struggled to follow the discussion. Based on the linked workaround, I'm wondering if something like this would work to maintain retries + call to failed parent, assuming the flow only has one set of children (no nesting):
Pseudocode:
References
The below are issues that seem to be related, but didn't have clear answers
Beta Was this translation helpful? Give feedback.
All reactions