blob: f63d8682ab7c48d8eb5400c1087114db26182249 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: true
class ResetAccountWorker
include Sidekiq::Worker
def perform(account_id)
account = Account.find(account_id)
return if account.local?
account_uri = account.uri
SuspendAccountService.new.call(account)
ResolveAccountService.new.call(account_uri)
rescue ActiveRecord::RecordNotFound
true
end
end
|