[英]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):我在代码中有 2 个“状态”(它们都在监听队列全局事件):
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来自
.on('stallled', ...)
事件处理程序中的Bull 事件引用
GitHub Repro (it contains docker-compose
and everything set up with explanation) GitHub Repro (它包含
docker-compose
和所有设置的解释)
Edit:编辑:
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.
恐怕这是按设计工作的,因为在 Bull 中,工作人员还负责检测停滞的作业,而在 BullMQ 中,您有 QueueScheduler 来处理这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.