-
Notifications
You must be signed in to change notification settings - Fork 7
Option: Starting resque workers in screen
acozine edited this page Jan 15, 2014
·
2 revisions
If you're not using resque-pool for some reason, you can run resque workers manually in a screen session.
- Start a screen session named resque
screen -S resque
- Move to your project's home directory
cd /opt/$HYDRA_NAME
- Start some workers (in this example, five of them)
COUNT=5 RAILS_ENV=production VERBOSE=1 QUEUE=* rake environment resque:work
- Detach from the screen session, leaving it running, by typing CTRL-a, then d
Useful screen/resque commands:
- To view your active screen sessions
screen -ls
- To resume the active screen session named resque
screen -r resque
- To stop the resque workers, resume the screen session, then type CTRL-c to stop resque
- To exit and close a screen session, either kill the process or resume the screen session, stop any workers, and type
exit