Class: HealthCheck::SidekiqHealthCheck

Inherits:
Object
  • Object
show all
Extended by:
BaseHealthCheck
Defined in:
lib/health_check/sidekiq_health_check.rb

Class Method Summary collapse

Methods included from BaseHealthCheck

create_error

Class Method Details

.checkObject



7
8
9
10
11
12
13
14
15
16
# File 'lib/health_check/sidekiq_health_check.rb', line 7

def self.check
  raise "Wrong configuration. Missing 'sidekiq' gem" unless defined?(::Sidekiq)

  ::Sidekiq.redis do |r|
    res = r.ping
    res == 'PONG' ? '' : "Sidekiq.redis.ping returned #{res.inspect} instead of PONG"
  end
rescue Exception => e
  create_error 'sidekiq-redis', e.message
end