* Add: #591 リモート保留中アカウントからメンションが来た場合にuriを記録し、承認時にフェッチしに行く処理 * Rename fetch_remove_status_worker.rb to fetch_remote_status_worker.rb * Wip * Add lock code
This commit is contained in:
parent
b2acc7dbb8
commit
2ab9ea642a
22 changed files with 307 additions and 15 deletions
14
app/workers/activate_remote_account_worker.rb
Normal file
14
app/workers/activate_remote_account_worker.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class ActivateRemoteAccountWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(account_id)
|
||||
account = Account.find_by(id: account_id)
|
||||
return true if account.nil?
|
||||
return true if account.suspended?
|
||||
|
||||
ActivateFollowRequestsService.new.call(account)
|
||||
ActivateRemoteStatusesService.new.call(account)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue