Skip to content

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.

  1. Start a screen session named resque
    screen -S resque
  2. Move to your project's home directory
    cd /opt/$HYDRA_NAME
  3. Start some workers (in this example, five of them)
    COUNT=5 RAILS_ENV=production VERBOSE=1 QUEUE=* rake environment resque:work
  4. 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
  1. To exit and close a screen session, either kill the process or resume the screen session, stop any workers, and type exit
Clone this wiki locally