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.

Direct Known Subclasses

Util::DryRun::RecordingEventPublisher

Defined Under Namespace

Classes: PublishEventError

Instance Method Summary collapse

Instance Method Details

#publish_events(events) ⇒ Object



30
31
32
33
34
35
# File 'lib/sequent/core/event_publisher.rb', line 30

def publish_events(events)
  return if configuration.disable_event_handlers

  events.each { |event| events_queue.push(event) }
  process_events
end