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

Add capistrano restart failback to start.

This commit is contained in:
Nick Herman 2013-09-26 13:09:23 +03:00
parent cd6c8fe942
commit 5b6dd661da

View file

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