From b8cbecbd1d5452f42d582ad679d80b1056488567 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Thu, 16 Dec 2021 15:35:51 -0800 Subject: [PATCH] Add a couple of accessors --- lib/puma/cluster.rb | 4 ++++ lib/puma/runner.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/puma/cluster.rb b/lib/puma/cluster.rb index 7d6d12189e..22df0fd8b1 100644 --- a/lib/puma/cluster.rb +++ b/lib/puma/cluster.rb @@ -27,6 +27,10 @@ def initialize(cli, events) @phased_restart = false end + # Returns the list of cluster worker handles. + # @return [Array] + attr_reader :workers + def stop_workers log "- Gracefully shutting down workers..." @workers.each { |x| x.term } diff --git a/lib/puma/runner.rb b/lib/puma/runner.rb index 3dd598aeed..a3211a09d3 100644 --- a/lib/puma/runner.rb +++ b/lib/puma/runner.rb @@ -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