more robust killing of delayed job processes
This commit is contained in:
@@ -90,11 +90,14 @@ 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 "pkill -SIGKILL -f delayed_job"
|
||||
end
|
||||
|
||||
desc "Restart delayed_job process"
|
||||
task :restart, :roles => :app do
|
||||
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job restart"
|
||||
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job stop"
|
||||
run "pkill -SIGKILL -f delayed_job"
|
||||
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job start"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user