mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-20 03:25:17 +01:00
Use Account.activitypub
generated scope (#28157)
This commit is contained in:
parent
049d9171eb
commit
14aa7f1e15
@ -442,7 +442,7 @@ class Account < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def inboxes
|
def inboxes
|
||||||
urls = reorder(nil).where(protocol: :activitypub).group(:preferred_inbox_url).pluck(Arel.sql("coalesce(nullif(accounts.shared_inbox_url, ''), accounts.inbox_url) AS preferred_inbox_url"))
|
urls = reorder(nil).activitypub.group(:preferred_inbox_url).pluck(Arel.sql("coalesce(nullif(accounts.shared_inbox_url, ''), accounts.inbox_url) AS preferred_inbox_url"))
|
||||||
DeliveryFailureTracker.without_unavailable(urls)
|
DeliveryFailureTracker.without_unavailable(urls)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ module Mastodon::CLI
|
|||||||
skip_threshold = 7.days.ago
|
skip_threshold = 7.days.ago
|
||||||
skip_domains = Concurrent::Set.new
|
skip_domains = Concurrent::Set.new
|
||||||
|
|
||||||
query = Account.remote.where(protocol: :activitypub)
|
query = Account.remote.activitypub
|
||||||
query = query.where(domain: domains) unless domains.empty?
|
query = query.where(domain: domains) unless domains.empty?
|
||||||
|
|
||||||
processed, culled = parallelize_with_progress(query.partitioned) do |account|
|
processed, culled = parallelize_with_progress(query.partitioned) do |account|
|
||||||
|
Loading…
Reference in New Issue
Block a user