Class: QueueBus::Publisher
- Inherits:
-
Object
- Object
- QueueBus::Publisher
- Defined in:
- lib/queue_bus/publisher.rb
Overview
A simple publishing worker for QueueBus. Makes publishing asynchronously possible since it may be enqueued to the background worker with a delay. This will allow the event to be published at a later time.
Class Method Summary collapse
Class Method Details
.perform(attributes) ⇒ Object
9 10 11 12 13 |
# File 'lib/queue_bus/publisher.rb', line 9 def perform(attributes) event_type = attributes['bus_event_type'] ::QueueBus.log_worker("Publisher running: #{event_type} - #{attributes.inspect}") ::QueueBus.publish(event_type, attributes) end |