class Sidekiq::Cluster::Memory::Total
Public Instance Methods
offenders()
click to toggle source
# File lib/sidekiq/cluster/memory/total.rb, line 9 def offenders total_ram_pct = worker_pool.map(&:memory_used_pct).sum worker_pool.cli.info("total RAM used by workers is #{'%.2f%%' % total_ram_pct}") if total_ram_pct > config.max_memory_percent worker_pool.sort_by(&:memory_used_pct).inverse[0..1] end || [] end