Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save look/176007 to your computer and use it in GitHub Desktop.
Save look/176007 to your computer and use it in GitHub Desktop.
# an example Monit configuration file for collectiveidea's fork of delayed_job.
# See: http://stackoverflow.com/questions/1226302/how-to-monitor-delayedjob-with-monit/1285611
#
# To use:
# 1. replace {app_name} and {environment} as appropriate
# 2. copy to your repository under config/delayed_job.monitrc
# 3. add this to your /etc/monit/monitrc:
#
# include /var/www/apps/{app_name}/current/config/*.monitrc
# 4. reload monit when you deploy to pick up any changes to your monitrc files: sudo monit reload
check process delayed_job with pidfile /var/www/apps/{app_name}/shared/pids/delayed_job.pid
start program = "/var/www/apps/{app_name}/current/script/delayed_job -e {environment} start"
stop program = "/var/www/apps/{app_name}/current/script/delayed_job -e {environment} stop"
@arikfr
Copy link

arikfr commented Dec 13, 2010

The -e option is no longer supported in delayed_job, hence it should be:
start program = "/usr/bin/env RAILS_ENV={enviroment} /var/www/apps/{app_name}/current/script/delayed_job start"

And similar change for stop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment