Module: Insights::API::Common::Status::Api
- Defined in:
- lib/insights/api/common/status.rb
Instance Method Summary collapse
Instance Method Details
#health ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/insights/api/common/status.rb', line 6 def health if PG::Connection.ping(ENV['DATABASE_URL'].split("?").first) == PG::Connection::PQPING_OK head :ok else head :internal_server_error end end |