Class: Spree::Imports::CreateRowsJob
- Defined in:
- app/jobs/spree/imports/create_rows_job.rb
Constant Summary collapse
- BATCH_SIZE =
1000
Instance Method Summary collapse
Instance Method Details
#perform(import_id) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'app/jobs/spree/imports/create_rows_job.rb', line 14 def perform(import_id) import = Spree::Import.find(import_id) import.start_processing! if import.status != 'processing' create_rows_sequentially(import) # enqueue processing rows job after creating rows in a separate job import.process_rows_async end |