bullmq icon indicating copy to clipboard operation
bullmq copied to clipboard

[Bug]: Flow jobs child failure handling is broken

Open CodingMeSwiftly opened this issue 10 months ago • 12 comments

Version

v4.6.3

Platform

NodeJS

What happened?

This is a follow up for #1469.

  • If a child job is failing, worker.on('failed', () => { ... } is invoked for the child job.
  • It is not invoked for the parent job failing, even if failParentOnFailure is set on the child.
  • Redis event stream shows: event: failed, jobId: xxx, failedReason: child xyz failed, prev: waiting-children, so the event is created, but the callback is never invoked.

According to #1469, this was fixed by #1481. However, it seems a regression was introduced with #1953.

Additionally, failParentOnFailure does not work with removeOnFail. Expected behaviour: If failParentOnFailure is set for a child and the parent has removeOnFail, the parent should be removed from the queue.

How to reproduce.

No response

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

CodingMeSwiftly avatar Oct 13 '23 09:10 CodingMeSwiftly