debian-mirror-gitlab/lib/gitlab/health_checks/redis_check.rb
2017-08-17 22:00:37 +05:30

25 lines
414 B
Ruby

module Gitlab
module HealthChecks
class RedisCheck
extend SimpleAbstractCheck
class << self
private
def metric_prefix
'redis_ping'
end
def is_successful?(result)
result == 'PONG'
end
def check
catch_timeout 10.seconds do
Gitlab::Redis.with(&:ping)
end
end
end
end
end
end