当处理器仅在恢复时终止时,公牛作业不会停止
Bull job is not stalled when processor terminated only when getting back up
我说的代码是下面链接的重现代码
我在代码中有 2 个“状态”(它们都在监听队列全局事件):
- 添加一条消息
- 收听消息
由于某些原因,当侦听器工作程序仅在工作程序备份时终止时,Bull 作业未报告为停滞。
尽管它应该如文档中所述:
.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(它包含 docker-compose
和所有设置的解释)
编辑:
已在 bullmq 上测试并且有效
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.
我说的代码是下面链接的重现代码
我在代码中有 2 个“状态”(它们都在监听队列全局事件):
- 添加一条消息
- 收听消息
由于某些原因,当侦听器工作程序仅在工作程序备份时终止时,Bull 作业未报告为停滞。
尽管它应该如文档中所述:
.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(它包含 docker-compose
和所有设置的解释)
编辑:
已在 bullmq 上测试并且有效
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.