1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Remove unused function, #2850

This commit is contained in:
Mike Perham 2016-02-25 13:58:36 -08:00
parent f63a8304c1
commit b2a8d5bffe
2 changed files with 2 additions and 19 deletions

View file

@ -58,18 +58,5 @@ module Sidekiq
arr.clear
end
def want_a_hertz_donut?
# what's a hertz donut?
# punch! Hurts, don't it?
info = Sidekiq.redis {|c| c.info }
if info['connected_clients'].to_i > 1000 && info['hz'].to_i >= 10
Sidekiq.logger.warn { "Your Redis `hz` setting is too high at #{info['hz']}. See mperham/sidekiq#2431. Set it to 3 in #{info[:config_file]}" }
true
else
Sidekiq.logger.debug { "Redis hz: #{info['hz']}. Client count: #{info['connected_clients']}" }
false
end
end
end
end

View file

@ -6,11 +6,7 @@ class TestUtil < Sidekiq::Test
include Sidekiq::Util
end
def test_hertz_donut
obj = Helpers.new
output = capture_logging(Logger::DEBUG) do
assert_equal false, obj.want_a_hertz_donut?
end
assert_includes output, "hz: 10"
def test_nothing_atm
assert true
end
end