Skip to content

Commit 493ad07

Browse files
committed
Fix engine compatibility
1 parent 9b4e334 commit 493ad07

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

psqlpy_piccolo/engine.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,11 @@ async def prep_database(self: Self) -> None:
485485
level=Level.medium,
486486
)
487487

488-
async def start_connnection_pool(self: Self, **kwargs: Dict[str, Any]) -> None:
488+
async def start_connnection_pool(
489+
self: Self,
490+
max_pool_size: int = 1,
491+
**kwargs: Dict[str, Any],
492+
) -> None:
489493
"""Start new connection pool.
490494
491495
Create and start new connection pool.
@@ -527,7 +531,10 @@ async def start_connection_pool(self: Self, **kwargs: Dict[str, Any]) -> None:
527531
else:
528532
config = dict(self.config)
529533
config.update(**kwargs)
530-
self.pool = ConnectionPool(**config)
534+
self.pool = ConnectionPool(
535+
max_db_pool_size=config.pop("max_size"),
536+
**config,
537+
)
531538

532539
async def close_connection_pool(self) -> None:
533540
"""Close connection pool."""

0 commit comments

Comments
 (0)