How to monitor delayed_job with monit

后端 未结 13 802
醉酒成梦
醉酒成梦 2020-12-02 04:11

Are there any examples on the web of how to monitor delayed_job with Monit?

Everything I can find uses God, but I refuse to use God since long running processes in

13条回答
  •  [愿得一人]
    2020-12-02 04:32

    For what it's worth, you can always use /usr/bin/env with monit to setup the environment. This is especially important in the current version of delayed_job, 1.8.4, where the environment (-e) option is deprecated.

    check process delayed_job with pidfile /var/app/shared/pids/delayed_job.pid
    start program = "/usr/bin/env RAILS_ENV=production /var/app/current/script/delayed_job start"
    stop  program = "/usr/bin/env RAILS_ENV=production /var/app/current/script/delayed_job stop"
    

    In some cases, you may also need to set the PATH with env, too.

提交回复
热议问题