fixed delayed_job kill task

This commit is contained in:
albert
2011-09-18 16:01:35 -04:00
parent b24fb3a2c7
commit 6cd929a614

View File

@@ -90,13 +90,13 @@ namespace :delayed_job do
desc "Stop delayed_job process"
task :stop, :roles => :app do
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job stop"
run "pgrep -f delayed_job | xargs kill -SIGKILL"
run "pkill -SIGKILL -f delayed_job ; true"
end
desc "Restart delayed_job process"
task :restart, :roles => :app do
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job stop"
run "pgrep -f delayed_job | xargs kill -SIGKILL"
run "pkill -SIGKILL -f delayed_job ; true"
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job start"
end
end