bullmq
bullmq copied to clipboard
Get failedChildren when using removeDependencyOnFailure
Is your feature request related to a problem? Please describe.
After the v4.4.0 update including the removeDependencyOnFailure feature (#1953) we can start a flow and upon completion we can get the parent job from the flowProducer that consists of a job object and a array of children. When using the removeDependencyOnFailure when a job fails, that job is not anymore in the children array.
Describe the solution you'd like Would it be possible to include a new array of failed children ? Looking through the jobs i can see that the job is not removed from redis.
Describe alternatives you've considered Using the failed event i can get the top level parent of a job and update a failed array in its data field. This doesn't seem like a reliable way to handle this.
Additional context Any way to get the failed children from a flow would be great.
I too would love to have this option. I am building a flow of jobs where each one of them runs a specific set of tests against our system on a daily basis. I am already using removeDependencyOnFailure
which is really very helpful but I also want to know the list of all the failed children along with the error information stored inside them because I want to either store this data in database or trigger mails based on all this information.
Is there a way to at least get the original list of job ids (including those that failed)? Maybe we can simply loop through them and fetch the required information?
hey folks, ignoreDependencyOnFailure feature is available since v5.2.0
hey folks, ignoreDependencyOnFailure feature is available since v5.2.0
May I check if this option ignores failures for only direct child dependencies or does it also continue to run if grandchildren and nested dependencies fail if I put the option at the top level?
hi @lltr, this option ignore the failure of that specific child, it only affect the child and the direct parent no other components of the flow
pls take a look https://docs.bullmq.io/guide/flows/ignore-dependency