* Fix: #284 `FetchInstanceInfoWorker`が原因でSidekiqのJobが詰まる問題 * Fix: InstanceInfoを取得するタイミング * Fix test * Fix test * Fix: HTTPコード * 調整
This commit is contained in:
parent
903b9ad347
commit
5173481ab7
8 changed files with 44 additions and 58 deletions
|
@ -46,7 +46,6 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
end
|
||||
|
||||
create_account
|
||||
fetch_instance_info
|
||||
end
|
||||
|
||||
update_account
|
||||
|
@ -66,6 +65,8 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
check_links! if @account.fields.any?(&:requires_verification?)
|
||||
end
|
||||
|
||||
fetch_instance_info
|
||||
|
||||
@account
|
||||
rescue Oj::ParseError
|
||||
nil
|
||||
|
@ -210,7 +211,7 @@ class ActivityPub::ProcessAccountService < BaseService
|
|||
end
|
||||
|
||||
def fetch_instance_info
|
||||
ActivityPub::FetchInstanceInfoWorker.perform_async(@account.domain) unless InstanceInfo.exists?(domain: @account.domain)
|
||||
ActivityPub::FetchInstanceInfoWorker.perform_async(@account.domain) unless Rails.cache.exist?("fetch_instance_info:#{@account.domain}", expires_in: 1.day)
|
||||
end
|
||||
|
||||
def actor_type
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue