1
0
mirror of https://github.com/whippyshou/mastodon synced 2024-12-26 20:48:26 +09:00
whippy-edition/app/workers/import_worker.rb
Eugen Rochko d14c276e58
Add option to overwrite imported data (#9962)
* Add option to overwrite imported data

Fix #7465

* 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