Class: Orchestration::Services::Mongo::Healthcheck
- Inherits:
-
Object
- Object
- Orchestration::Services::Mongo::Healthcheck
- Includes:
- HealthcheckBase
- Defined in:
- lib/orchestration/services/mongo/healthcheck.rb
Instance Attribute Summary
Attributes included from HealthcheckBase
Instance Method Summary collapse
- #connect ⇒ Object
- #connection_errors ⇒ Object
-
#initialize(env) ⇒ Healthcheck
constructor
A new instance of Healthcheck.
Methods included from HealthcheckBase
Constructor Details
#initialize(env) ⇒ Healthcheck
9 10 11 |
# File 'lib/orchestration/services/mongo/healthcheck.rb', line 9 def initialize(env) @configuration = Configuration.new(env) end |
Instance Method Details
#connect ⇒ Object
17 18 19 20 21 22 |
# File 'lib/orchestration/services/mongo/healthcheck.rb', line 17 def connect # REVIEW: For some reason this is extremely slow. Worth trying # to see if there's a faster way to fail. Mongoid.load_configuration(@configuration.settings) !Mongoid.default_client.database_names.empty? end |
#connection_errors ⇒ Object
13 14 15 |
# File 'lib/orchestration/services/mongo/healthcheck.rb', line 13 def connection_errors [::Mongo::Error::NoServerAvailable] end |