class CDMDEXER::ETLBySetSpecs

Attributes

etl_config[R]
etl_worker_klass[R]
set_specs[R]

Public Class Methods

new(set_specs: [:missing_setspec], etl_config: :missing_etl_config, etl_worker_klass: ETLWorker) click to toggle source
# File lib/cdmdexer/etl_by_set_specs.rb, line 4
def initialize(set_specs: [:missing_setspec],
               etl_config: :missing_etl_config,
               etl_worker_klass: ETLWorker)
  @set_specs        = set_specs
  @etl_config       = etl_config
  @etl_worker_klass = etl_worker_klass
end

Public Instance Methods

run!() click to toggle source
# File lib/cdmdexer/etl_by_set_specs.rb, line 12
def run!
  set_specs.map do |set_spec|
    etl_worker_klass.perform_async(etl_config.merge(set_spec: set_spec))
  end
end