简体   繁体   中英

Bull job is not stalled when processor terminated only when getting back up

the code that I'm talking about is the repro code linked below


I have 2 "states" in the code (both of them are listening to queue global events):

  1. Add a single message
  2. Listen to messages

For some reason, Bull job is not reported as stalled when the listener worker is terminated only when the worker is back up.

although it should as stated in the docs:

 .on('stalled', function (job) { // A job has been marked as stalled. This is useful for debugging job // workers that crash or pause the event loop. });

From Bull event reference in .on('stallled', ...) event handler

GitHub Repro (it contains docker-compose and everything set up with explanation)


Edit:

Tested on bullmq and it works

I am afraid this works as designed, since in Bull the workers are also responsible of detecting stalled jobs, while in BullMQ you have the QueueScheduler that takes care of this.

From Bull Repo - Issue 2141

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM