Class: Wellness::Services::PostgresService
- Defined in:
- lib/wellness/services/postgres_service.rb
Overview
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#call, dependency, #failed_check, #healthy?, #initialize, #passed_check
Constructor Details
This class inherits a constructor from Wellness::Services::Base
Instance Method Details
#check ⇒ Hash
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/wellness/services/postgres_service.rb', line 12 def check case PG::Connection.ping() when PG::Constants::PQPING_NO_ATTEMPT ping_failed('no attempt made to ping') when PG::Constants::PQPING_NO_RESPONSE ping_failed('no response from ping') when PG::Constants::PQPING_REJECT ping_failed('ping was rejected') else ping_successful end end |