(hostname="localhost", password=None, username="postgres")
| 41 | |
| 42 | |
| 43 | def 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 | |
| 56 | def drop_db(hostname="localhost", username=None, password=None, dbname=None, port=None): |
nothing calls this directly
no test coverage detected