Created
March 7, 2012 16:44
-
-
Save jlecour/1994287 to your computer and use it in GitHub Desktop.
Monit config for Resque workers.
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
check process resque_api_0 | |
with pidfile /home/deploy/apps/api/current/tmp/pids/resque_worker_0.pid | |
start program = "/bin/sh -c 'cd /home/deploy/apps/api/current; GEM_HOME=/home/deploy/.gem/ruby/1.8 GEM_PATH=/home/deploy/.gem/ruby/1.8 PATH=$PATH:/home/deploy/.gem/ruby/1.8/bin:./bin nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=* PIDFILE=tmp/pids/resque_worker_0.pid INTERVAL=2 >> log/resque_worker_0.log'" as uid deploy and gid deploy | |
stop program = "/bin/sh -c 'cd /home/deploy/apps/api/current && kill -s QUIT `cat tmp/pids/resque_worker_0.pid` && rm -f tmp/pids/resque_worker_0.pid; exit 0;'" | |
if totalmem is greater than 350 MB for 10 cycles then restart # eating up memory? | |
GROUP resque_api |
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
check process resque_api_0 | |
with pidfile /home/deploy/apps/api/current/tmp/pids/resque_worker_0.pid | |
start program = "/bin/sh -c 'cd /home/deploy/apps/api/current; nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=* PIDFILE=tmp/pids/resque_worker_0.pid INTERVAL=2 >> log/resque_worker_0.log'" as uid deploy and gid deploy | |
stop program = "/bin/sh -c 'cd /home/deploy/apps/api/current && kill -s QUIT `cat tmp/pids/resque_worker_0.pid` && rm -f tmp/pids/resque_worker_0.pid; exit 0;'" | |
if totalmem is greater than 350 MB for 10 cycles then restart # eating up memory? | |
GROUP resque_api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment