1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

fallback from phased restart to start when not started

This commit is contained in:
Alex Gusev 2014-04-10 12:35:00 +04:00
parent db33a35768
commit 122866c6c9

View file

@ -42,7 +42,12 @@ Capistrano::Configuration.instance.load do
desc 'Restart puma (phased restart)'
task :phased_restart, :roles => lambda { puma_role }, :on_no_matching_servers => :continue do
run "cd #{current_path} && #{pumactl_cmd} -S #{state_path} phased-restart"
begin
run "cd #{current_path} && #{pumactl_cmd} -S #{state_path} phased-restart"
rescue Capistrano::CommandError => ex
puts "Failed to restart puma: #{ex}\nAssuming not started."
start
end
end
end