Class: VitalsMonitor::Checks::Postgres
- Defined in:
- lib/vitals_monitor/checks/postgres.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
Instance Method Details
#check ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/vitals_monitor/checks/postgres.rb', line 6 def check timeout do connection = ActiveRecord::Base.connection connection.execute("SELECT 1") healthy end rescue StandardError => e unhealthy("PostgreSQL connection failed: #{e.}") end |