~cytrogen/masto-fe

ref: 7e7d6e695b5b7ef8d8c10b1d9ac79375ca1b8209 masto-fe/app/workers/admin/account_deletion_worker.rb -rw-r--r-- 337 bytes
7e7d6e69 — Claire Fix incorrectly keeping outdated update notices absent from the API endpoint (#27021) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class Admin::AccountDeletionWorker
  include Sidekiq::Worker

  sidekiq_options queue: 'pull', lock: :until_executed

  def perform(account_id)
    DeleteAccountService.new.call(Account.find(account_id), reserve_username: true, reserve_email: true)
  rescue ActiveRecord::RecordNotFound
    true
  end
end