Skip to content

Commit

Permalink
Add a couple of accessors (#2774)
Browse files Browse the repository at this point in the history
Co-authored-by: Olivier Bellone <olivier@bellone.fr>
  • Loading branch information
ob-stripe and olivierbellone committed Jan 31, 2022
1 parent 3dfabf6 commit c92b69f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/puma/cluster.rb
Expand Up @@ -27,6 +27,10 @@ def initialize(cli, events)
@phased_restart = false
end

# Returns the list of cluster worker handles.
# @return [Array<Puma::Cluster::WorkerHandle>]
attr_reader :workers

def stop_workers
log "- Gracefully shutting down workers..."
@workers.each { |x| x.term }
Expand Down
4 changes: 4 additions & 0 deletions lib/puma/runner.rb
Expand Up @@ -18,6 +18,10 @@ def initialize(cli, events)
@wakeup = nil
end

# Returns the hash of configuration options.
# @return [Puma::UserFileDefaultOptions]
attr_reader :options

def wakeup!
return unless @wakeup

Expand Down

0 comments on commit c92b69f

Please sign in to comment.