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

Speed up phased-restart start

This commit is contained in:
Evan Phoenix 2016-03-20 14:14:35 -07:00
parent 8b05d0a763
commit 38f6a92231

View file

@ -424,12 +424,21 @@ module Puma
@launcher.events.fire_on_booted! @launcher.events.fire_on_booted!
begin begin
force_check = false
while @status == :run while @status == :run
begin begin
res = IO.select([read], nil, nil, 5) if @phased_restart
start_phased_restart
@phased_restart = false
end
check_workers force_check
force_check = false force_check = false
res = IO.select([read], nil, nil, 5)
if res if res
req = read.read_nonblock(1) req = read.read_nonblock(1)
@ -455,13 +464,6 @@ module Puma
end end
end end
if @phased_restart
start_phased_restart
@phased_restart = false
end
check_workers force_check
rescue Interrupt rescue Interrupt
@status = :stop @status = :stop
end end