问题
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