~cytrogen/masto-fe

ref: 152b10b6246987bfb2cc73ecd2a20578d05b62dc masto-fe/app/workers/import_worker.rb -rw-r--r-- 390 bytes
152b10b6 — Christian Schmidt Fix some React warnings (#26609) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

# NOTE: This is a deprecated worker, only kept to not break ongoing imports
# on upgrade. See `ImportWorker` for its replacement.

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