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-9.16.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.16.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.8 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.7 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.6 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.5 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.4 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.3 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.2 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.15.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.6 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.5 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.4 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.3 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.2 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.14.0 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.13.1 lib/govuk_app_config/govuk_healthcheck/redis.rb
govuk_app_config-9.13.0 lib/govuk_app_config/govuk_healthcheck/redis.rb