Class: RailsEventStore::AsyncProxyStrategy::AfterCommit::AsyncRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/rails_event_store/active_job_dispatcher.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass, event) ⇒ AsyncRecord

Returns a new instance of AsyncRecord.



19
20
21
22
# File 'lib/rails_event_store/active_job_dispatcher.rb', line 19

def initialize(klass, event)
  @klass = klass
  @event = event
end

Instance Method Details

#committed!Object



24
25
26
# File 'lib/rails_event_store/active_job_dispatcher.rb', line 24

def committed!
  @klass.perform_later(YAML.dump(@event))
end