Class: EventEngine::Subscribers::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/event_engine/subscribers/processor.rb

Constant Summary collapse

HANDLED_PROCESS_TYPES =
[ :inline, :background ].freeze

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object



6
7
8
9
10
11
# File 'lib/event_engine/subscribers/processor.rb', line 6

def call(event)
  case event.process_type&.to_sym
  when :inline then dispatch_synchronously(event)
  when :background then dispatch_in_background(event)
  end
end