Class: EventRouter::DeliveryAdapters::Workers::SidekiqDestinationDeliveryWorker
- Inherits:
-
Object
- Object
- EventRouter::DeliveryAdapters::Workers::SidekiqDestinationDeliveryWorker
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/event_router/delivery_adapters/workers/sidekiq_destination_delivery_worker.rb
Instance Method Summary collapse
Instance Method Details
#perform(destination_name, serialized_event, serialized_payload) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/event_router/delivery_adapters/workers/sidekiq_destination_delivery_worker.rb', line 9 def perform(destination_name, serialized_event, serialized_payload) event = EventRouter.deserialize(serialized_event) destination = event.destinations[destination_name.to_sym] return unless destination payload = if destination.prefetch_payload? EventRouter.deserialize(serialized_payload) else destination.extra_payload(event) end destination.process(event, payload) end |