Rewrite import feature (#21054)
This commit is contained in:
parent
0ad2413b35
commit
32a030dd74
40 changed files with 2059 additions and 113 deletions
13
app/workers/bulk_import_worker.rb
Normal file
13
app/workers/bulk_import_worker.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class BulkImportWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
sidekiq_options queue: 'pull', retry: false
|
||||
|
||||
def perform(import_id)
|
||||
import = BulkImport.find(import_id)
|
||||
import.update!(state: :in_progress)
|
||||
BulkImportService.new.call(import)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue