Class: Karafka::Pro::Processing::JobsBuilder
- Inherits:
-
Karafka::Processing::JobsBuilder
- Object
- Karafka::Processing::JobsBuilder
- Karafka::Pro::Processing::JobsBuilder
- Defined in:
- lib/karafka/pro/processing/jobs_builder.rb
Overview
Pro jobs builder that supports lrj
Instance Method Summary collapse
- #consume(executor, messages) ⇒ Karafka::Processing::Jobs::Consume, Karafka::Pro::Processing::Jobs::ConsumeNonBlocking
- #eofed(executor) ⇒ Karafka::Processing::Jobs::Eofed, Karafka::Processing::Jobs::EofedBlocking
- #idle(executor) ⇒ Object
- #periodic(executor) ⇒ Jobs::Periodic, Jobs::PeriodicNonBlocking
- #revoked(executor) ⇒ Karafka::Processing::Jobs::Revoked, Karafka::Processing::Jobs::RevokedNonBlocking
Methods inherited from Karafka::Processing::JobsBuilder
Instance Method Details
#consume(executor, messages) ⇒ Karafka::Processing::Jobs::Consume, Karafka::Pro::Processing::Jobs::ConsumeNonBlocking
28 29 30 31 32 33 34 |
# File 'lib/karafka/pro/processing/jobs_builder.rb', line 28 def consume(executor, ) if executor.topic.long_running_job? Jobs::ConsumeNonBlocking.new(executor, ) else super end end |
#eofed(executor) ⇒ Karafka::Processing::Jobs::Eofed, Karafka::Processing::Jobs::EofedBlocking
40 41 42 43 44 45 46 |
# File 'lib/karafka/pro/processing/jobs_builder.rb', line 40 def eofed(executor) if executor.topic.long_running_job? Jobs::EofedNonBlocking.new(executor) else super end end |
#idle(executor) ⇒ Object
20 21 22 |
# File 'lib/karafka/pro/processing/jobs_builder.rb', line 20 def idle(executor) Karafka::Processing::Jobs::Idle.new(executor) end |
#periodic(executor) ⇒ Jobs::Periodic, Jobs::PeriodicNonBlocking
63 64 65 66 67 68 69 |
# File 'lib/karafka/pro/processing/jobs_builder.rb', line 63 def periodic(executor) if executor.topic.long_running_job? Jobs::PeriodicNonBlocking.new(executor) else Jobs::Periodic.new(executor) end end |
#revoked(executor) ⇒ Karafka::Processing::Jobs::Revoked, Karafka::Processing::Jobs::RevokedNonBlocking
52 53 54 55 56 57 58 |
# File 'lib/karafka/pro/processing/jobs_builder.rb', line 52 def revoked(executor) if executor.topic.long_running_job? Jobs::RevokedNonBlocking.new(executor) else super end end |