Class: Gitlab::Memory::Watchdog::Handlers::PumaHandler
- Inherits:
-
Object
- Object
- Gitlab::Memory::Watchdog::Handlers::PumaHandler
- Defined in:
- lib/gitlab/memory/watchdog/handlers/puma_handler.rb
Overview
This handler invokes Puma’s graceful termination handler, which takes into account a configurable grace period during which a process may remain unresponsive to a SIGTERM.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(puma_options = ::Puma.cli_config.options) ⇒ PumaHandler
constructor
A new instance of PumaHandler.
Constructor Details
#initialize(puma_options = ::Puma.cli_config.options) ⇒ PumaHandler
Returns a new instance of PumaHandler.
11 12 13 |
# File 'lib/gitlab/memory/watchdog/handlers/puma_handler.rb', line 11 def initialize( = ::Puma.cli_config.) @worker = ::Puma::Cluster::WorkerHandle.new(0, $$, 0, ) end |
Instance Method Details
#call ⇒ Object
15 16 17 18 |
# File 'lib/gitlab/memory/watchdog/handlers/puma_handler.rb', line 15 def call @worker.term true end |