Skip to content

Commit c375746

Browse files
committed
enable more options to be forwarded to the asyncpg pool
1 parent be2dc9b commit c375746

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tifeatures/db.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ async def con_init(conn):
2727

2828

2929
async def connect_to_db(
30-
app: FastAPI, settings: Optional[PostgresSettings] = None
30+
app: FastAPI,
31+
settings: Optional[PostgresSettings] = None,
32+
**kwargs,
3133
) -> None:
3234
"""Connect."""
3335
if not settings:
@@ -40,6 +42,7 @@ async def connect_to_db(
4042
max_queries=settings.db_max_queries,
4143
max_inactive_connection_lifetime=settings.db_max_inactive_conn_lifetime,
4244
init=con_init,
45+
**kwargs,
4346
)
4447

4548

0 commit comments

Comments
 (0)