Class: Ribbon::EventBus::Publishers::ResquePublisher
- Defined in:
- lib/ribbon/event_bus/publishers/resque_publisher.rb
Defined Under Namespace
Modules: PublisherJob, SubscriptionJob
Instance Method Summary collapse
Methods inherited from Publisher
Methods included from Mixins::HasConfig
#_has_config_config, #_has_config_load_config, #config, included
Methods included from Mixins::HasInstance
Constructor Details
This class inherits a constructor from Ribbon::EventBus::Publishers::Publisher
Instance Method Details
#publish(event) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/ribbon/event_bus/publishers/resque_publisher.rb', line 8 def publish(event) super unless event.subscriptions.empty? PublisherJob.set_queue(config.publisher_queue.to_sym) sub_queue_format = config.subscription_queue_format.to_s Resque.enqueue(PublisherJob, sub_queue_format, event.serialize) end end |