hometown/app/workers/import_worker.rb
Eugen Rochko d14c276e58
Add option to overwrite imported data ()
* Add option to overwrite imported data

Fix 

* Add import for domain blocks
2019-02-03 03:59:51 +01:00

15 lines
259 B
Ruby

# frozen_string_literal: true
class ImportWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull', retry: false
def perform(import_id)
import = Import.find(import_id)
ImportService.new.call(import)
ensure
import&.destroy
end
end