Batched remove status service (#3735)
* Make Pubsubhubbub::DistributionWorker handle both single stream entry arguments, as well as arrays of stream entries * Add BatchedRemoveStatusService, make SuspendAccountService use it * Improve method names * Add test * Add more tests * Use PuSH payloads of 100 to have a clear mapping of 1000 input statuses -> 10 PuSH payloads It was nice while it lasted
This commit is contained in:
parent
4a618908e8
commit
e17c2e5da5
5 changed files with 216 additions and 23 deletions
|
@ -17,9 +17,8 @@ class SuspendAccountService < BaseService
|
|||
end
|
||||
|
||||
def purge_content
|
||||
@account.statuses.reorder(nil).find_each do |status|
|
||||
# This federates out deletes to previous followers
|
||||
RemoveStatusService.new.call(status)
|
||||
@account.statuses.reorder(nil).find_in_batches do |statuses|
|
||||
BatchedRemoveStatusService.new.call(statuses)
|
||||
end
|
||||
|
||||
[
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue