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:
@ -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
|
||||
|
||||
[
|
||||
|
Reference in New Issue
Block a user