Class: Materialist::EventHandler
- Inherits:
-
Object
- Object
- Materialist::EventHandler
- Defined in:
- lib/materialist/event_handler.rb
Constant Summary collapse
- DEFAULT_SIDEKIQ_OPTIONS =
{ retry: 10 }.freeze
Instance Method Summary collapse
Instance Method Details
#call(event) ⇒ Object
14 15 16 |
# File 'lib/materialist/event_handler.rb', line 14 def call(event) worker(topic(event)).perform_async(event) end |
#on_events_received(batch) ⇒ Object
10 11 12 |
# File 'lib/materialist/event_handler.rb', line 10 def on_events_received(batch) batch.each { |event| call(event) if should_materialize?(topic(event)) } end |