Fix Ruby 2.5 incompatibility (#17465)

local
Claire 2 years ago committed by GitHub
parent f1f6ddd536
commit 52c1b86964
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb

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

Loading…
Cancel
Save