add kill step to unicorn cap

This commit is contained in:
r888888888 2016-08-02 22:14:50 -07:00
parent 7cf2dbc15b
commit 8abd94b02d

View File

@ -5,7 +5,16 @@ namespace :unicorn do
execute "[[ -n $(pgrep -f unicorn) ]] && pgrep -f unicorn | xargs kill -SIGTERM"
end
end
desc "Kills unicorn processes (blocks until complete)"
task :kill do
on roles(:app) do
execute "[[ -n $(pgrep -f unicorn) ]] && pgrep -f unicorn | xargs kill -SIGKILL"
end
end
end
after "deploy:published", "unicorn:stop"
after "deploy:published", "unicorn:terminate"
after "deploy:published", "unicorn:kill"
after "deploy:published", "unicorn:start"