Skip to content

Commit

Permalink
Fix Ruby 2.5 incompatibility (mastodon#17465)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and jesseplusplus committed Feb 10, 2022
1 parent e639054 commit 7f614a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def perform
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

Expand Down

0 comments on commit 7f614a2

Please sign in to comment.