mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Merge pull request #518 from LongMan/master
fallback from phased restart to start when not started
This commit is contained in:
commit
e22921c3d8
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue