mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 21:15:05 +01:00
Move sending account Delete to anyone but the account's followers to the pull̀ queue (#10016)
This commit is contained in:
parent
0e513ff862
commit
99c4b5b75a
@ -102,6 +102,10 @@ class SuspendAccountService < BaseService
|
|||||||
ActivityPub::DeliveryWorker.push_bulk(delivery_inboxes) do |inbox_url|
|
ActivityPub::DeliveryWorker.push_bulk(delivery_inboxes) do |inbox_url|
|
||||||
[delete_actor_json, @account.id, inbox_url]
|
[delete_actor_json, @account.id, inbox_url]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
ActivityPub::LowPriorityDeliveryWorker.push_bulk(low_priority_delivery_inboxes) do |inbox_url|
|
||||||
|
[delete_actor_json, @account.id, inbox_url]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_actor_json
|
def delete_actor_json
|
||||||
@ -117,7 +121,11 @@ class SuspendAccountService < BaseService
|
|||||||
end
|
end
|
||||||
|
|
||||||
def delivery_inboxes
|
def delivery_inboxes
|
||||||
Account.inboxes + Relay.enabled.pluck(:inbox_url)
|
@delivery_inboxes ||= @account.followers.inboxes + Relay.enabled.pluck(:inbox_url)
|
||||||
|
end
|
||||||
|
|
||||||
|
def low_priority_delivery_inboxes
|
||||||
|
Account.inboxes - delivery_inboxes
|
||||||
end
|
end
|
||||||
|
|
||||||
def associations_for_destruction
|
def associations_for_destruction
|
||||||
|
5
app/workers/activitypub/low_priority_delivery_worker.rb
Normal file
5
app/workers/activitypub/low_priority_delivery_worker.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class ActivityPub::LowPriorityDeliveryWorker < ActivityPub::DeliveryWorker
|
||||||
|
sidekiq_options queue: 'pull', retry: 8, dead: false
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user