Skip to content

Instantly share code, notes, and snippets.

@cherring
Created January 3, 2011 05:56
Show Gist options
  • Save cherring/763164 to your computer and use it in GitHub Desktop.
Save cherring/763164 to your computer and use it in GitHub Desktop.
## This is just mangled out of the resque repo
check process resque with pidfile /path/to/pidfile.pid
start program = "/bin/sh -c 'cd /path/to/app/current; /usr/bin/env RAILS_ENV=production /usr/bin/env QUEUE="*" VERBOSE=1 /usr/bin/rake environment resque:work & > log/resque.log && echo $! > tmp/pids/resque.pid'" as uid rails and gid rails
stop program = "/bin/sh -c 'cd /path/to/app/current && kill -s QUIT `cat tmp/pids/resque.pid` && rm -f tmp/pids/resque.pid; exit 0;'"
if totalmem is greater than 100 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