()
| 48 | |
| 49 | |
| 50 | def 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 | |
| 64 | class Results: |