(database_url: str)
| 89 | |
| 90 | lock = _checkpointer_setup_locks.setdefault(conn_str, asyncio.Lock()) |
| 91 | async with lock: |
| 92 | if _checkpointer_setup_states.get(conn_str): |
| 93 | return |
| 94 | |
| 95 | logger.debug( |
| 96 | "ensure_postgres_checkpointer_setup: connecting to %s", |
| 97 | redact_credentials(conn_str), |
| 98 | ) |
| 99 | conn = await asyncpg.connect(conn_str) |
| 100 | try: |
| 101 | for statement in _BOOTSTRAP_STATEMENTS: |