Delayed job wont start using Capistrano

前端 未结 6 1473
醉话见心
醉话见心 2021-02-04 13:14

I cannot start delayed job process using a capistrano recipe. Here\'s the error I am getting.

/usr/local/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.1/lib/delayed/         


        
6条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 13:23

    I also got this error and found a couple of issues:

    • Ensure you have a shared/pids folder.
    • Ensure you have the correct hooks setup

    Your deploy.rb script should contain:

    require "delayed/recipes"
    
    after "deploy:stop", "delayed_job:stop"
    after "deploy:start", "delayed_job:start"
    after "deploy:restart", "delayed_job:restart"
    

    I'd copied the hooks from an old post and they appear to be incorrect now. These are from the actual delayed_job recipe file comments.

    I believe cap deploy:setup should create the pids folder but I set things up a different way and it was not created. app/current/tmp/pids links to app/shared/pids and this was causing the false directory exists error.

提交回复
热议问题