Skip to content

Commit

Permalink
Need to change '%' to '$' in the 'stop program' command.
Browse files Browse the repository at this point in the history
Otherwise the program doesn't actually stop even though monit makes it looks like
everything restarts fine.

Thanks to @macmartine, @yaauie, @cea2k.

Fixes resque#527, resque#497, resque#492
  • Loading branch information
hone committed Jun 26, 2012
1 parent 40ec7c2 commit 01af327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/monit/resque.monit
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
check process resque_worker_QUEUE
with pidfile /data/APP_NAME/current/tmp/pids/resque_worker_QUEUE.pid
start program = "/usr/bin/env HOME=/home/user RACK_ENV=production PATH=/usr/local/bin:/usr/local/ruby/bin:/usr/bin:/bin:$PATH /bin/sh -l -c 'cd /data/APP_NAME/current; nohup bundle exec rake environment resque:work RAILS_ENV=production QUEUE=queue_name VERBOSE=1 PIDFILE=tmp/pids/resque_worker_QUEUE.pid >> log/resque_worker_QUEUE.log 2>&1'" as uid deploy and gid deploy
stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -9 %(cat tmp/pids/resque_worker_QUEUE.pid) && rm -f tmp/pids/resque_worker_QUEUE.pid; exit 0;'"
stop program = "/bin/sh -c 'cd /data/APP_NAME/current && kill -9 $(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

0 comments on commit 01af327

Please sign in to comment.