Class: QueueBus::Publisher
- Inherits:
-
Object
- Object
- QueueBus::Publisher
- Defined in:
- lib/queue_bus/publisher.rb
Overview
publishes on a delay
Class Method Summary collapse
Class Method Details
.perform(*args) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/queue_bus/publisher.rb', line 6 def perform(*args) # TODO: move this to just resquebus for fallback if args.size > 1 # handles older arguments event_type = args.first attributes = args.last else attributes = args.first event_type = attributes["bus_event_type"] end ::QueueBus.log_worker("Publisher running: #{event_type} - #{attributes.inspect}") ::QueueBus.publish(event_type, attributes) end |