lib/cap_recipes/tasks/delayed_job/manage.rb in nesquena-cap-recipes-0.3.13 vs lib/cap_recipes/tasks/delayed_job/manage.rb in nesquena-cap-recipes-0.3.15
- old
+ new
@@ -4,24 +4,24 @@
set :delayed_job_role, :app
set :base_ruby_path, '/usr'
namespace :delayed_job do
desc "Start delayed_job process"
- task :start, :roles => :app do
+ task :start, :roles => delayed_job_role do
with_role(delayed_job_role) do
try_sudo "#{base_ruby_path}/bin/ruby #{delayed_script_path} start #{delayed_job_env}"
end
end
desc "Stop delayed_job process"
- task :stop, :roles => :app do
+ task :stop, :roles => delayed_job_role do
with_role(delayed_job_role) do
try_sudo "#{base_ruby_path}/bin/ruby #{delayed_script_path} stop #{delayed_job_env}"
end
end
desc "Restart delayed_job process"
- task :restart, :roles => :app do
+ task :restart, :roles => delayed_job_role do
with_role(delayed_job_role) do
delayed_job.stop
sleep(4)
try_sudo "killall -s TERM delayed_job; true"
delayed_job.start