MCPcopy Create free account
hub / github.com/PostHog/duckgres / wait_for_duckgres

Function wait_for_duckgres

scripts/client-compat/clients/pgadmin/test_pgadmin.py:50–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48
49
50def wait_for_duckgres():
51 print("Waiting for duckgres...")
52 for attempt in range(30):
53 try:
54 conn = get_conn()
55 conn.close()
56 print(f"Connected after {attempt + 1} attempt(s).")
57 return
58 except Exception:
59 time.sleep(1)
60 print("FAIL: Could not connect after 30 seconds")
61 sys.exit(1)
62
63
64class Results:

Callers 1

mainFunction · 0.70

Calls 2

closeMethod · 0.80
get_connFunction · 0.70

Tested by

no test coverage detected