Module: Karafka::Pro::Routing::Features::ActiveJob::Builder
- Defined in:
- lib/karafka/pro/routing/features/active_job/builder.rb
Overview
Pro ActiveJob builder expansions
Instance Method Summary collapse
-
#active_job_pattern(regexp_or_name, regexp = nil, &block) ⇒ Object
This method simplifies routes definition for ActiveJob patterns / queues by auto-injecting the consumer class and other things needed.
Instance Method Details
#active_job_pattern(regexp_or_name, regexp = nil, &block) ⇒ Object
This method simplifies routes definition for ActiveJob patterns / queues by auto-injecting the consumer class and other things needed
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/karafka/pro/routing/features/active_job/builder.rb', line 29 def active_job_pattern(regexp_or_name, regexp = nil, &block) pattern(regexp_or_name, regexp) do consumer App.config.internal.active_job.consumer_class active_job true manual_offset_management true next unless block instance_eval(&block) end end |