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:
parent
db33a35768
commit
122866c6c9
1 changed files with 6 additions and 1 deletions
|
@ -42,7 +42,12 @@ Capistrano::Configuration.instance.load do
|
||||||
|
|
||||||
desc 'Restart puma (phased restart)'
|
desc 'Restart puma (phased restart)'
|
||||||
task :phased_restart, :roles => lambda { puma_role }, :on_no_matching_servers => :continue do
|
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
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue