My Resque worker class
class WebWorker
@queue = :jobs_queue
def self.perform(id)
//bunch of code here
end
end
I remove from the queue a certain job like this
Resque.dequeue(WebWorker,id)
But I would like to stop running job and restart, how would I do this?
Try the unregister_worker
as follow:
Resque.workers.each(&:unregister_worker)
This command will stop the work and set it as failed.
http://www.rubydoc.info/gems/resque/Resque/Worker:unregister_worker