desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
within release_path do
execute :mkdir, "-p", "tmp/pids"
execute :bundle, :exec, :'bin/delayed_job', fetch(:delayed_job_args, ""), :restart
end
end
end
Which gives me the following:
INFO [3c24696f] Running ~/.rvm/bin/rvm default do bundle exec bin/delayed_job -n 2 restart on bctools
DEBUG [3c24696f] Command: cd /var/rails/bctoolsapp/releases/20140422082857 && ~/.rvm/bin/rvm default do bundle exec bin/delayed_job -n 2 restart
DEBUG [3c24696f] Warning: no instances running. Starting...
DEBUG [3c24696f] Warning: no instances running. Starting...
INFO [3c24696f] Finished in 4.032 seconds with exit status 0 (successful).
The problem is, each time I run the deploy code, I get the same output and when running ps, it shows it isn't actually finding the running tasks and is instead just starting up two new ones each time.
Hi,
I'm on:
I have implemented the deploy code as per the rake and deploy code at: https://github.com/collectiveidea/delayed_job/wiki/Delayed-Job-tasks-for-Capistrano-3
When I run that code, I get the following error:
I'm having similar problems to this chap: https://github.com/rvm/rvm1-capistrano3/issues/26 who swapped out the line in the deploy restart task to this:
Which gives me the following:
The problem is, each time I run the deploy code, I get the same output and when running ps, it shows it isn't actually finding the running tasks and is instead just starting up two new ones each time.
Is this something anyone else has come across before? If so, I'd appreciate it if you could point me in the direction of a fix.
Thanks in advance.