Class: GovukHealthcheck::Mongoid

Inherits:
Object
  • Object
show all
Defined in:
lib/govuk_app_config/govuk_healthcheck/mongoid.rb

Instance Method Summary collapse

Instance Method Details

#nameObject



3
4
5
# File 'lib/govuk_app_config/govuk_healthcheck/mongoid.rb', line 3

def name
  :database_connectivity
end

#statusObject



7
8
9
10
11
12
# File 'lib/govuk_app_config/govuk_healthcheck/mongoid.rb', line 7

def status
  ::Mongoid.default_client.database_names.any?
  GovukHealthcheck::OK
rescue StandardError
  GovukHealthcheck::CRITICAL
end