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

Document that Puma.stats inside of a child process is not supported

Close #1963
This commit is contained in:
Nate Berkopec 2019-09-12 08:12:01 +00:00 committed by GitHub
parent b33b2dd624
commit 3ce98b7960
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -346,7 +346,9 @@ module Puma
log "+ Changing to #{dir}"
Dir.chdir dir
end
# Inside of a child process, this will return all zeroes, as @workers is only populated in
# the master process.
def stats
old_worker_count = @workers.count { |w| w.phase != @phase }
booted_worker_count = @workers.count { |w| w.booted? }