bullmq icon indicating copy to clipboard operation
bullmq copied to clipboard

Get failedChildren when using removeDependencyOnFailure

Open M3talen opened this issue 1 year ago • 1 comments

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. image

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.

M3talen avatar Jul 24 '23 14:07 M3talen

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?

prolific avatar Oct 25 '23 09:10 prolific

hey folks, ignoreDependencyOnFailure feature is available since v5.2.0

roggervalf avatar Aug 02 '24 05:08 roggervalf

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?

lltr avatar Aug 15 '24 12:08 lltr

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

roggervalf avatar Aug 15 '24 13:08 roggervalf

pls take a look https://docs.bullmq.io/guide/flows/ignore-dependency

roggervalf avatar Aug 15 '24 13:08 roggervalf