Class: Inventory::MigrationWorker

Inherits:
ApplicationWorker show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/inventory/migration_worker.rb

Overview

app/workers/inventory/migration_worker.rb

Instance Method Summary collapse

Methods inherited from ApplicationWorker

unlimited_retry

Instance Method Details

#perform(offset, batch_size, restaurant_id) ⇒ Object



5
6
7
8
9
# File 'app/workers/inventory/migration_worker.rb', line 5

def perform(offset, batch_size, restaurant_id)
  ActiveRecord::Base.connection_pool.with_connection do
    migrate_data(offset, batch_size, restaurant_id)
  end
end