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:
parent
8b05d0a763
commit
38f6a92231
1 changed files with 10 additions and 8 deletions
|
@ -424,12 +424,21 @@ module Puma
|
|||
@launcher.events.fire_on_booted!
|
||||
|
||||
begin
|
||||
force_check = false
|
||||
|
||||
while @status == :run
|
||||
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
|
||||
|
||||
res = IO.select([read], nil, nil, 5)
|
||||
|
||||
if res
|
||||
req = read.read_nonblock(1)
|
||||
|
||||
|
@ -455,13 +464,6 @@ module Puma
|
|||
end
|
||||
end
|
||||
|
||||
if @phased_restart
|
||||
start_phased_restart
|
||||
@phased_restart = false
|
||||
end
|
||||
|
||||
check_workers force_check
|
||||
|
||||
rescue Interrupt
|
||||
@status = :stop
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue