Created
March 21, 2011 03:14
-
-
Save gretch/878957 to your computer and use it in GitHub Desktop.
resque - monit
This file contains hidden or 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
| #from defunkt | |
| check process resque_worker_QUEUE | |
| with pidfile /data/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid | |
| start program = "/bin/sh -c 'cd /data/APP_NAME/current; nohup rake environment resque:work RAILS_ENV=production QUEUE=queue_name VERBOSE=1 PIDFILE=tmp/pids/resque_worker_QUEUE.pid & > log/resque_worker_QUEUE.log" as uid deploy and gid deploy | |
| stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -s QUIT `cat tmp/pids/resque_worker_QUEUE.pid` && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'" | |
| if totalmem is greater than 300 MB for 10 cycles then restart # eating up memory? | |
| group resque_workers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment