mirror of
https://github.com/kikobar/mastodon.git
synced 2024-12-25 23:34:14 +00:00
Fix Ruby 2.5 incompatibility (#17465)
This commit is contained in:
parent
f1f6ddd536
commit
52c1b86964
|
@ -66,7 +66,7 @@ class Scheduler::AccountsStatusesCleanupScheduler
|
||||||
end
|
end
|
||||||
|
|
||||||
def compute_budget
|
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
|
[PER_THREAD_BUDGET * threads, MAX_BUDGET].min
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue