mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
expose old_worker_count
in stats url
This allows one to write a script that waits for the result of a phased-restart command to complete
This commit is contained in:
parent
246e71840e
commit
6c7e9508e8
1 changed files with 3 additions and 1 deletions
|
@ -284,7 +284,9 @@ module Puma
|
|||
end
|
||||
|
||||
def stats
|
||||
%Q!{ "workers": #{@workers.size}, "phase": #{@phase}, "booted_workers": #{@workers.count{|w| w.booted?}} }!
|
||||
old_worker_count = @workers.count { |w| w.phase != @phase }
|
||||
booted_worker_count = @workers.count { |w| w.booted? }
|
||||
%Q!{ "workers": #{@workers.size}, "phase": #{@phase}, "booted_workers": #{booted_worker_count}, "old_workers": #{old_worker_count} }!
|
||||
end
|
||||
|
||||
def preload?
|
||||
|
|
Loading…
Reference in a new issue