Rewrite import feature (#21054)
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user