gitlab-org--gitlab-foss/lib/gitlab/health_checks/redis_check.rb

26 lines
414 B
Ruby
Raw Normal View History

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