Sidekiq: Is it possible to “pause” a queue?

▼魔方 西西 提交于 2019-12-14 02:15:56

问题


Is it possible to "pause" a sidekiq queue?

I have a download job running, but I have to travel/hibernate my Mac so I want to tell sidekiq to pause for a bit.

Is there a straightforward way to do that?


回答1:


You can just gracefully shut sidekiq down by sending a USR1 signal - upon receiving it, it will stop taking new jobs from redis, but complete already running ones

See more here

But if your task is long-runing and not split into parts or idempodent then you're out of luck




回答2:


You cannot stop a job mid-process. If you want to stop processing new jobs from a queue, that's a Sidekiq Pro feature.



来源:https://stackoverflow.com/questions/34226984/sidekiq-is-it-possible-to-pause-a-queue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!