Class: Karafka::Processing::ConsumerGroups::Jobs::Idle
- Inherits:
-
Jobs::Base
- Object
- Jobs::Base
- Karafka::Processing::ConsumerGroups::Jobs::Idle
- Defined in:
- lib/karafka/processing/consumer_groups/jobs/idle.rb
Overview
Type of job that we may use to run some extra handling that happens without the user related lifecycle event like consumption, revocation, etc.
Instance Attribute Summary
Attributes inherited from Jobs::Base
Instance Method Summary collapse
-
#before_schedule ⇒ Object
Runs code prior to scheduling this idle job.
-
#call ⇒ Object
Run the idle work via the executor.
- #initialize(executor) ⇒ Idle constructor
Methods inherited from Jobs::Base
#after_call, #before_call, #finish!, #finished?, #non_blocking?, #wrap
Constructor Details
#initialize(executor) ⇒ Idle
15 16 17 18 |
# File 'lib/karafka/processing/consumer_groups/jobs/idle.rb', line 15 def initialize(executor) @executor = executor super() end |
Instance Method Details
#before_schedule ⇒ Object
Runs code prior to scheduling this idle job
21 22 23 |
# File 'lib/karafka/processing/consumer_groups/jobs/idle.rb', line 21 def before_schedule executor.before_schedule_idle end |
#call ⇒ Object
Run the idle work via the executor
26 27 28 |
# File 'lib/karafka/processing/consumer_groups/jobs/idle.rb', line 26 def call executor.idle end |