diff options
author | Nick Schonning <nschonni@gmail.com> | 2023-02-19 20:28:40 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 02:28:40 +0100 |
commit | 21bf32635687770bc0026d769a69f49b89f8a0a2 (patch) | |
tree | 9fde82eedc10fe01b9450a2591fc2f530f29c1d6 /app/workers | |
parent | 597767a9f7ca846be9fbca826aba362f8387a60f (diff) |
Autofix Rubocop Rails/Pluck (#23730)
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb b/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb index bd92fe32c..cc5b6e137 100644 --- a/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb +++ b/app/workers/scheduler/accounts_statuses_cleanup_scheduler.rb @@ -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 |