Class: Karafka::Pro::Processing::Jobs::Periodic
- Inherits:
-
Karafka::Processing::Jobs::Base
- Object
- Karafka::Processing::Jobs::Base
- Karafka::Pro::Processing::Jobs::Periodic
- Defined in:
- lib/karafka/pro/processing/jobs/periodic.rb
Overview
Job that represents a “ticking” work. Work that we run periodically for the Periodics enabled topics.
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Karafka::Processing::Jobs::Base
Instance Method Summary collapse
-
#before_schedule ⇒ Object
Code executed before we schedule this job.
-
#call ⇒ Object
Runs the executor periodic action.
-
#initialize(executor) ⇒ Periodic
constructor
A new instance of Periodic.
Methods inherited from Karafka::Processing::Jobs::Base
#after_call, #before_call, #finish!, #finished?, #non_blocking?
Constructor Details
#initialize(executor) ⇒ Periodic
Returns a new instance of Periodic.
23 24 25 26 |
# File 'lib/karafka/pro/processing/jobs/periodic.rb', line 23 def initialize(executor) @executor = executor super() end |
Instance Method Details
#before_schedule ⇒ Object
Code executed before we schedule this job
29 30 31 |
# File 'lib/karafka/pro/processing/jobs/periodic.rb', line 29 def before_schedule executor.before_schedule_periodic end |
#call ⇒ Object
Runs the executor periodic action
34 35 36 |
# File 'lib/karafka/pro/processing/jobs/periodic.rb', line 34 def call executor.periodic end |