Class: Karafka::Processing::Jobs::Shutdown
- Defined in:
- lib/karafka/processing/jobs/shutdown.rb
Overview
Job that runs on each active consumer upon process shutdown (one job per consumer).
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#call ⇒ Object
Runs the shutdown job via an executor.
- #initialize(executor) ⇒ Shutdown constructor
Methods inherited from Base
#after_call, #before_call, #before_enqueue, #non_blocking?
Constructor Details
#initialize(executor) ⇒ Shutdown
11 12 13 14 |
# File 'lib/karafka/processing/jobs/shutdown.rb', line 11 def initialize(executor) @executor = executor super() end |
Instance Method Details
#call ⇒ Object
Runs the shutdown job via an executor.
17 18 19 |
# File 'lib/karafka/processing/jobs/shutdown.rb', line 17 def call executor.shutdown end |