rvm monit delayed_job

前端 未结 2 1479
长发绾君心
长发绾君心 2021-01-07 06:06

I am trying to run delayed_job using monit, but its failing to run as rvm\'s paths (local rvm installation per user basis) are not available to the command. My application i

2条回答
  •  庸人自扰
    2021-01-07 06:54

    'rvm -S' didn't work for me.

    The instructions on http://matthew.mceachen.us/blog/howto-make-system-wide-rvm-installations-work-with-cron-monit-delayed_job-and-passenger-1021.html did.

    check process delayed_job.0
      with pidfile /u/apps/adgrok/shared/pids/delayed_job.0.pid
      start program = "/usr/local/bin/rvm-shell -c 'RAILS_ENV=production /u/apps/adgrok/current/script/delayed_job start -i 0'" as uid deploy and gid deploy
      stop program = "/usr/local/bin/rvm-shell -c 'RAILS_ENV=production /u/apps/adgrok/current/script/delayed_job stop -i 0'" as uid deploy and gid deploy
      if 2 restarts within 15 cycles then timeout
    

    There is also a noteworthy reference to a thread of discussion with the author of RVM about monit : http://groups.google.com/group/rubyversionmanager/browse_thread/thread/d1a6c1f6396a8bf6/51afece4c8943912?#51afece4c8943912

提交回复
热议问题