Sha256: a51be6b42ca6bc1c2b57fdd78e083d717d078e610808715dbc5f8accaf0a794d

Contents?: true

Size: 397 Bytes

Versions: 93

Compression:

Stored size: 397 Bytes

Contents

require "securerandom"

module GovukHealthcheck
  class Redis
    def name
      :redis_connectivity
    end

    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
  end
end

Version data entries

93 entries across 93 versions & 1 rubygems

Version Path
govuk_app_config-4.10.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.10.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.9.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.8.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.7.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.7.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.6.3 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.6.2 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.6.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.6.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.5.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.4.3 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.4.2 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.4.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.4.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.3.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.2.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.1.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.0.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-4.0.0 lib/govuk_app_config/govuk_healthcheck/redis.rb