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

Add a couple of accessors (#2774)

Co-authored-by: Olivier Bellone <olivier@bellone.fr>
This commit is contained in:
Olivier Bellone 2022-01-31 10:46:47 -08:00 committed by GitHub
parent 3dfabf61a0
commit c92b69fc0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -27,6 +27,10 @@ module Puma
@phased_restart = false @phased_restart = false
end end
# Returns the list of cluster worker handles.
# @return [Array<Puma::Cluster::WorkerHandle>]
attr_reader :workers
def stop_workers def stop_workers
log "- Gracefully shutting down workers..." log "- Gracefully shutting down workers..."
@workers.each { |x| x.term } @workers.each { |x| x.term }

View file

@ -18,6 +18,10 @@ module Puma
@wakeup = nil @wakeup = nil
end end
# Returns the hash of configuration options.
# @return [Puma::UserFileDefaultOptions]
attr_reader :options
def wakeup! def wakeup!
return unless @wakeup return unless @wakeup