Class: Sequent::Core::EventPublisher

Inherits:
Object
  • Object
show all
Defined in:
lib/sequent/core/event_publisher.rb

Overview

EventPublisher ensures that, for every thread, events will be published in the order in which they are queued for publishing.

This potentially introduces a wrinkle into your plans: You therefore should not split a “unit of work” across multiple threads.

If you want other behaviour, you are free to implement your own version of EventPublisher and configure Sequent to use it.

Defined Under Namespace

Classes: PublishEventError

Instance Method Summary collapse

Instance Method Details

#publish_events(events) ⇒ Object



24
25
26
27
28
# File 'lib/sequent/core/event_publisher.rb', line 24

def publish_events(events)
  return if configuration.disable_event_handlers
  events.each { |event| events_queue.push(event) }
  process_events
end