ruby-on-rails resque
Updated Tue, 16 Aug 2022 00:45:42 GMT

Redis and Resque, workers not getting updated application code

I'm having a rough time here with Resque, firstly, in development when running rake resque:work QUEUE='*' to work on the queue it starts up fine and starts running the perform method for my workers, which is fine; the problem is that the workers don't seem to run my new application code, say I update the perform method in that worker then Ctrl+c out of that rake resque:work QUEUE='*' process and starting it up again, whilst queuing new jobs to be worked on doesn't result in the worker running with the new updated code.

So mainly my problem here is, how do I safely kill the resque:work task and restart my workers with the new application code?


Resque workers respond to a few different signals:

QUIT - Wait for child to finish processing then exit
TERM / INT - Immediately kill child then exit
USR1 - Immediately kill child but don't exit
USR2 - Don't start to process any new jobs
CONT - Start to process new jobs again after a USR2

If you want to gracefully shutdown a Resque worker, use QUIT.

kill -s QUIT

if you want to setup resque restart with capitrano, use this gits

Comments (1)

External Links

External links referenced by this document: