0
0
Fork 0

Autofix Rubocop Rails/Pluck (#23730)

This commit is contained in:
Nick Schonning 2023-02-19 20:28:40 -05:00 committed by GitHub
parent 597767a9f7
commit 21bf326356
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 25 deletions

View file

@ -67,7 +67,7 @@ class Scheduler::AccountsStatusesCleanupScheduler
end
def compute_budget
threads = Sidekiq::ProcessSet.new.select { |x| x['queues'].include?('push') }.map { |x| x['concurrency'] }.sum
threads = Sidekiq::ProcessSet.new.select { |x| x['queues'].include?('push') }.pluck('concurrency').sum
[PER_THREAD_BUDGET * threads, MAX_BUDGET].min
end