Fix redis check with_timing method usage

This commit is contained in:
Pawel Chojnacki 2017-07-25 15:17:05 +02:00
parent b1d6670d04
commit 37f27079fe

View file

@ -15,7 +15,7 @@ module Gitlab
end
def metrics
with_timing method(:check) do |result, elapsed|
result, elapsed = with_timing(&method(:check))
Rails.logger.error("#{human_name} check returned unexpected result #{result}") unless is_successful?(result)
[
metric("#{metric_prefix}_timeout", result.is_a?(Timeout::Error) ? 1 : 0),
@ -23,7 +23,6 @@ module Gitlab
metric("#{metric_prefix}_latency_seconds", elapsed)
]
end
end
private