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
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