Class: Dionysus::Producer::Genesis::StreamJob

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/dionysus/producer/genesis/stream_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(topic, model_klass, from, to, number_of_days, streamer_job, options = {}) ⇒ Object



8
9
10
11
12
13
# File 'lib/dionysus/producer/genesis/stream_job.rb', line 8

def perform(topic, model_klass, from, to, number_of_days, streamer_job, options = {})
  final_options = options.symbolize_keys.reverse_merge(number_of_days: number_of_days)
  Dionysus::Producer::Genesis::Streamer
    .new(job_class: streamer_job.constantize)
    .stream(topic, model_klass.constantize, from, to, final_options)
end