Add pipeline arg

This commit is contained in:
Nuno Campos
2024-08-19 15:44:22 -07:00
parent 7aaeedd7ba
commit c0c534cbe3
2 changed files with 2 additions and 2 deletions
@@ -316,7 +316,7 @@ class PostgresSaver(BasePostgresSaver):
writes (List[Tuple[str, Any]]): List of writes to store.
task_id (str): Identifier for the task creating the writes.
"""
with self._cursor() as cur:
with self._cursor(pipeline=True) as cur:
cur.execute(
self.DELETE_WRITES_SQL,
config["configurable"]["thread_id"],
@@ -272,7 +272,7 @@ class AsyncPostgresSaver(BasePostgresSaver):
writes (Sequence[Tuple[str, Any]]): List of writes to store, each as (channel, value) pair.
task_id (str): Identifier for the task creating the writes.
"""
async with self._cursor() as cur:
async with self._cursor(pipeline=True) as cur:
await cur.execute(
self.DELETE_WRITES_SQL,
config["configurable"]["thread_id"],