Kill all resque workers with a single command
We are using God to start workers on all servers, both front end and back end (with different queues).
God sometimes has an issue with leaving some stale workers laying around which cache old code, so if you change your code, this is your enemy since you start seeing failed jobs that should not fail what so ever.
Even when you stop the rakes (Workers run by rake) with god, it will still leave those lying around.
In one word, Frustrating…
So, I was IM’ng with Chiu-Ki and we were talking about killing workers, and I was telling here how to kill those.
She told me she has a shell script for it.
There you go…
and if you just want to test before doing some killing, you can run this:
Of course after this GOD will restart the workers with the new code and that’s it, you have fresh workers, with new code, ready to be up and running.Submit to Hacker News
[NOTE] This post has been imported to Hugo from a Wordpress blog. It may be broken, missing images, code snippets or other information.
[NOTE] updated September 16, 2011. It's 2690 days old . This article may have outdated content.