How do I clear stuck/stale Resque workers?

后端 未结 15 724
你的背包
你的背包 2020-12-07 07:22

As you can see from the attached image, I\'ve got a couple of workers that seem to be stuck. Those processes shouldn\'t take longer than a couple of seconds.

15条回答
  •  囚心锁ツ
    2020-12-07 07:49

    If you are using newer versions of Resque, you'll need to use the following command as the internal APIs have changed...

    Resque::WorkerRegistry.working.each {|work| Resque::WorkerRegistry.remove(work.id)}
    

提交回复
热议问题