module Insights::API::Common::Status::Api

Public Instance Methods

health() click to toggle source
# 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