Created
July 1, 2011 17:13
-
-
Save rguggemos/1058983 to your computer and use it in GitHub Desktop.
redis and resque example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#RESQUE | |
#the resque_queue_start.sh contains this script: | |
# cd /web/bmn/; nohup bundle exec rake environment resque:work RAILS_ENV=staging QUEUE=* VERBOSE=1 PIDFILE=/web/bmn/log/resque_queue.pid 2>&1 | |
check process resque_queue with pidfile /var/run/resque_queue.pid | |
start program = "/bin/su - root -c '/etc/redis/resque_queue_start.sh'" | |
stop program = "/bin/sh -c 'cd /web/bmn-dev/ && kill -s QUIT `cat /var/run/resque_queue.pid` && rm -f /var/run/resque_queue.pid; exit 0;'" | |
depends on redis | |
#REDIS | |
check process redis with pidfile /var/run/redis.pid | |
start program = "/etc/init.d/redis-server start" | |
stop program = "/etc/init.d/redis-server stop" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment