fixed delayed_job kill task
This commit is contained in:
@@ -90,13 +90,13 @@ namespace :delayed_job do
|
|||||||
desc "Stop delayed_job process"
|
desc "Stop delayed_job process"
|
||||||
task :stop, :roles => :app do
|
task :stop, :roles => :app do
|
||||||
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job stop"
|
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
|
end
|
||||||
|
|
||||||
desc "Restart delayed_job process"
|
desc "Restart delayed_job process"
|
||||||
task :restart, :roles => :app do
|
task :restart, :roles => :app do
|
||||||
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job stop"
|
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"
|
run "cd #{current_path}; RAILS_ENV=#{rails_env} script/delayed_job start"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user