A platform for community discussion. Free, open, simple.
DEV(cache_critical_dns): improve postgres_healthcheck
Michael Fitz-Payne0553788d3bfa
diff --git a/script/cache_critical_dns b/script/cache_critical_dnsindex a4350aed5c3..f63763e5894 100755--- a/script/cache_critical_dns+++ b/script/cache_critical_dns@@ -158,16 +158,18 @@ ensureenddef postgres_healthcheck(host:, user:, password:, dbname:)- response = PG::Connection.ping(+ client = PG::Connection.new(host: host,user: user,password: password,dbname: dbname,connect_timeout: 2, # minimum)- response == PG::Constants::PQPING_OK+ client.exec(';').none?rescuefalse+ensure+ client.close if clientendHEALTH_CHECKS = {