Class: EventRouter::DeliveryAdapters::Sync
- Defined in:
- lib/event_router/delivery_adapters/sync.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.deliver(event) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/event_router/delivery_adapters/sync.rb', line 7 def deliver(event) event.destinations.each do |_name, destination| payload = destination.extra_payload(event) destination.process(event, payload) end end |
.deliver_async(event) ⇒ Object
15 16 17 |
# File 'lib/event_router/delivery_adapters/sync.rb', line 15 def deliver_async(event) Thread.new { deliver(event) } end |