Change sidekiq-bulk's batch size from 10,000 to 1,000 jobs in one Redis call (#24034)

This commit is contained in:
Claire
2023-03-15 03:45:15 +01:00
committed by GitHub
parent ed887271f3
commit 1d0ad558ff
10 changed files with 16 additions and 16 deletions

View File

@@ -22,7 +22,7 @@ class UpdateAccountService < BaseService
def authorize_all_follow_requests(account)
follow_requests = FollowRequest.where(target_account: account)
follow_requests = follow_requests.preload(:account).select { |req| !req.account.silenced? }
AuthorizeFollowWorker.push_bulk(follow_requests) do |req|
AuthorizeFollowWorker.push_bulk(follow_requests, limit: 1_000) do |req|
[req.account_id, req.target_account_id]
end
end