Class: HealthCheck::RabbitMQHealthCheck

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

Class Method Summary collapse

Methods included from BaseHealthCheck

create_error

Class Method Details

.checkObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/health_check/rabbitmq_health_check.rb', line 4

def self.check
  unless defined?(::Bunny)
    raise "Wrong configuration. Missing 'bunny' gem"
  end
  connection = Bunny.new(HealthCheck.rabbitmq_config)
  connection.start
  connection.close
  ''
rescue Exception => e
  create_error 'rabbitmq', e.message
end