Class: Bulky::Worker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
lib/bulky/worker.rb

Constant Summary collapse

QUEUE =
ENV.fetch('BULKY_QUEUE', 'default').freeze

Instance Method Summary collapse

Instance Method Details

#perform(model_name, update_id, bulk_update_id) ⇒ Object



8
9
10
11
# File 'lib/bulky/worker.rb', line 8

def perform(model_name, update_id, bulk_update_id)
  model = model_name.constantize.find(update_id)
  Bulky::Updater.new(model, bulk_update_id).update!
end