Fix redis check with_timing method usage
This commit is contained in:
parent
b1d6670d04
commit
37f27079fe
1 changed files with 7 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue