class GovukHealthcheck::Redis

Public Instance Methods

name() click to toggle source
# File lib/govuk_app_config/govuk_healthcheck/redis.rb, line 5
def name
  :redis_connectivity
end
status() click to toggle source
# File lib/govuk_app_config/govuk_healthcheck/redis.rb, line 9
def status
  client = ::Redis.new

  key = "healthcheck-#{SecureRandom.hex}"

  client.set(key, "val")
  client.get(key)
  client.del(key)

  client.close

  GovukHealthcheck::OK
rescue StandardError
  GovukHealthcheck::CRITICAL
end