Skip to content

Commit 5faccef

Browse files
committed
Updated deps versions
Signed-off-by: chandr-andr (Kiselev Aleksandr) <[email protected]>
1 parent c5c3ce0 commit 5faccef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

taskiq_psqlpy/result_backend.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pickle
22
from typing import Any, Final, Literal, Optional, TypeVar, cast
33

4-
from psqlpy import PSQLPool
4+
from psqlpy import ConnectionPool
55
from psqlpy.exceptions import RustPSQLDriverPyBaseError
66
from taskiq import AsyncResultBackend, TaskiqResult
77

@@ -33,23 +33,23 @@ def __init__(
3333
3434
:param dsn: connection string to PostgreSQL.
3535
:param keep_results: flag to not remove results from Redis after reading.
36-
:param connect_kwargs: additional arguments for nats `PSQLPool` class.
36+
:param connect_kwargs: additional arguments for nats `ConnectionPool` class.
3737
"""
3838
self.dsn: Final = dsn
3939
self.keep_results: Final = keep_results
4040
self.table_name: Final = table_name
4141
self.field_for_task_id: Final = field_for_task_id
4242
self.connect_kwargs: Final = connect_kwargs
4343

44-
self._database_pool: PSQLPool
44+
self._database_pool: ConnectionPool
4545

4646
async def startup(self) -> None:
4747
"""Initialize the result backend.
4848
4949
Construct new connection pool
5050
and create new table for results if not exists.
5151
"""
52-
self._database_pool = PSQLPool(
52+
self._database_pool = ConnectionPool(
5353
dsn=self.dsn,
5454
**self.connect_kwargs,
5555
)
@@ -68,7 +68,7 @@ async def startup(self) -> None:
6868

6969
async def shutdown(self) -> None:
7070
"""Close the connection pool."""
71-
await self._database_pool.close()
71+
self._database_pool.close()
7272

7373
async def set_result(
7474
self,

0 commit comments

Comments
 (0)