Skip to content

Commit

Permalink
docs: update async connection pool example in postgres how-to (#1318)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda authored Aug 12, 2024
1 parent 4e643ba commit 6a22b7c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/persistence_postgres.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -364,14 +364,12 @@
"source": [
"from psycopg_pool import AsyncConnectionPool\n",
"\n",
"pool = AsyncConnectionPool(\n",
"async with AsyncConnectionPool(\n",
" # Example configuration\n",
" conninfo=DB_URI,\n",
" max_size=20,\n",
" kwargs=connection_kwargs\n",
")\n",
"\n",
"async with pool.connection() as conn:\n",
") as pool, pool.connection() as conn:\n",
" checkpointer = AsyncPostgresSaver(conn)\n",
"\n",
" # NOTE: you need to call .setup() the first time you're using your checkpointer\n",
Expand Down

0 comments on commit 6a22b7c

Please sign in to comment.