简体   繁体   English

杀死所有延迟工作的工人

[英]Kill all delayed_job workers

I use delayed_job as a daemon https://github.com/tobi/delayed_job/wiki/Running-Delayed::Worker-as-a-daemon 我将delay_job用作守护程序https://github.com/tobi/delayed_job/wiki/Running-Delayed::Worker-as-a-daemon

I can't tell why, but sometimes I see more than one job done by several workers (different pids), and running stop doesn't stop anything. 我不知道为什么,但是有时候我看到多个工人完成了一项以上的工作(不同的pid),并且运行stop并不能停止任何事情。 is there a way to kill all daemons of this proc/all workers? 有没有办法杀死这个进程/所有工人的所有守护进程? Or kill a specific pid (I'm on a shared hosting so kill/killall aren't available for me). 或杀死一个特定的pid(我在共享主机上,所以kill / killall对我不可用)。

Not having access to "kill" in this setup will quickly become a PITA, and it boggles my mind that you wouldn't have the ability to kill processes you yourself started. 在这种设置中无法访问“ kill”将很快成为PITA,这让我感到困惑,因为您将无法终止自己启动的进程。

For increased worker dependability, you might want to try the collectiveidea fork of delayed_job, and using the daemon-spawn gem rather than daemons. 为了提高工作人员的可靠性,您可能需要尝试delay_job的collectionidea分支,并使用守护程序生成的gem而不是守护程序。 I've had better luck with that combination. 结合起来我运气更好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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