Reviving stale / zombie resque worker
When working on sending to users information about changes being done to a task I created another background job for adding / removing attachments to the task (attachment is actually polymorphic). Some way the process hanged. After that background jobs ceased to stop sending mails.
Killing all relevant processes or even restarting the system didn’t help. Fortunately you can open rails console
and access Resque with the ability to kill or process the culprit.
pry:1> cd Resque
pry(Resque):1> info
=> {:pending=>0,
:processed=>185,
:queues=>2,
:workers=>1,
:working=>1,
:failed=>22,
:servers=>["redis://127.0.0.1:6379/0"],
:environment=>"development"}
pry(main)> cd Worker.all.first.process
Written by Wojtek Ryrych
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#