Class: RailsEventStore::ActiveJobIdOnlyScheduler

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

Instance Method Summary collapse

Instance Method Details

#call(klass, record) ⇒ Object



7
8
9
# File 'lib/rails_event_store/active_job_id_only_scheduler.rb', line 7

def call(klass, record)
  klass.perform_later({ "event_id" => record.event_id })
end

#verify(subscriber) ⇒ Object



11
12
13
# File 'lib/rails_event_store/active_job_id_only_scheduler.rb', line 11

def verify(subscriber)
  Class === subscriber && !!(subscriber < ActiveJob::Base)
end