MCPcopy Index your code
hub / github.com/dbcli/pgcli / pgbouncer_available

Function pgbouncer_available

tests/features/db_utils.py:43–53  ·  view source on GitHub ↗
(hostname="localhost", password=None, username="postgres")

Source from the content-addressed store, hash-verified

41
42
43def pgbouncer_available(hostname="localhost", password=None, username="postgres"):
44 cn = None
45 try:
46 cn = create_cn(hostname, password, username, "pgbouncer", 6432)
47 return True
48 except Exception:
49 print("Pgbouncer is not available.")
50 finally:
51 if cn:
52 cn.close()
53 return False
54
55
56def drop_db(hostname="localhost", username=None, password=None, dbname=None, port=None):

Callers

nothing calls this directly

Calls 1

create_cnFunction · 0.85

Tested by

no test coverage detected