blob: 312d880b970d64ccd460376d02dee43247a72098 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
class SoftBlockWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull'
def perform(account_id, target_account_id)
account = Account.find(account_id)
target_account = Account.find(target_account_id)
BlockService.new.call(account, target_account)
UnblockService.new.call(account, target_account)
rescue ActiveRecord::RecordNotFound
true
end
end
|