Class: GovukHealthcheck::SidekiqRedis
- Inherits:
-
Object
- Object
- GovukHealthcheck::SidekiqRedis
- Defined in:
- lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb
Instance Method Summary collapse
Instance Method Details
#name ⇒ Object
3 4 5 |
# File 'lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb', line 3 def name :redis_connectivity end |
#status ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/govuk_app_config/govuk_healthcheck/sidekiq_redis.rb', line 7 def status # Sidekiq 7 introduced a default_configuration object which has .redis_info # for querying Redis information. If the default_configuration object isn't present, # we can fall back to the old method of querying it using 'Sidekiq.redis_info'. if Sidekiq.respond_to?(:default_configuration) Sidekiq.default_configuration.redis_info ? OK : CRITICAL else Sidekiq.redis_info ? OK : CRITICAL end rescue StandardError # One would expect a Redis::BaseConnectionError, but this should be # critical if any exception is raised when making a call to redis. CRITICAL end |