Autofix Rubocop Rails/Pluck (#23730)
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user