RedHatInsights / insights-api-common-rails

Header, Encryption, RBAC, Serialization, Pagination and other common behavior for Insights microservices built with Rails
Apache License 2.0
3 stars 25 forks source link

Update the Status Api for flags on `DATABASE_URL` #154

Closed lindgrenj6 closed 4 years ago

lindgrenj6 commented 4 years ago

before, the Status API would just ping ENV['DATABASE_URL'] and check for ok, this does not work for connection strings that have flags on the end such as catalog: postgresql://xxx:xxx@catalog-postgresql:5432/catalog_production?encoding=utf8&pool=5&wait_timeout=5

This updates the code to handle such a connection string.