43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/event_sourcery/postgres/reactor.rb', line 43
def initialize(tracker: EventSourcery::Postgres.config.event_tracker,
db_connection: EventSourcery::Postgres.config.projections_database,
event_source: EventSourcery::Postgres.config.event_source,
event_sink: EventSourcery::Postgres.config.event_sink)
@tracker = tracker
@event_source = event_source
@event_sink = event_sink
@db_connection = db_connection
if self.class.emits_events?
if event_sink.nil? || event_source.nil?
raise ArgumentError, 'An event sink and source is required for processors that emit events'
end
end
end
|