ecto_psql_extras
ecto_psql_extras copied to clipboard
Feature idea: automatic PG health checks
I'm adding the issue as placeholder to not to forget the idea and gather feedback.
I'd like to add a way to automatically check the health of your database based on both default and customizable conditions. Something on the lines of https://blog.heroku.com/pg-diagnose
maybe like pg_hero does it: https://github.com/ankane/pghero/blob/master/app/views/pg_hero/home/index.html.erb
Sounds good but it might be worth renaming it from health check if you want it to be more like the diagnose command.
For a health check you'd expect something like a SELECT 1;
running every 30 seconds to make sure your database server is running and your database user can successfully connect to the database it's connecting to.