Method: Puma::DSL#out_of_band

Defined in:
lib/puma/dsl.rb

#out_of_band(&block) ⇒ Object

Code to run out-of-band when the worker is idle. These hooks run immediately after a request has finished processing and there are no busy threads on the worker. The worker doesn’t accept new requests until this code finishes.

This hook is useful for running out-of-band garbage collection or scheduling asynchronous tasks to execute after a response.

This can be called multiple times to add several hooks.



786
787
788
# File 'lib/puma/dsl.rb', line 786

def out_of_band(&block)
  process_hook :out_of_band, nil, block, 'out_of_band'
end