remove flag

This commit is contained in:
vbarda
2024-08-07 12:25:34 -04:00
parent 51b62ca0bd
commit 54da68cfe7
2 changed files with 0 additions and 14 deletions
@@ -22,8 +22,6 @@ from langgraph.checkpoint.serde.base import SerializerProtocol
class AsyncPostgresSaver(BasePostgresSaver):
lock: asyncio.Lock
is_setup: bool
def __init__(
self,
conn: AsyncConnection,
@@ -34,7 +32,6 @@ class AsyncPostgresSaver(BasePostgresSaver):
self.conn = conn
self.pipe = pipe
self.lock = asyncio.Lock()
self.is_setup = False
@classmethod
@asynccontextmanager
@@ -66,8 +63,6 @@ class AsyncPostgresSaver(BasePostgresSaver):
already exist. It is called automatically when needed and should not be called
directly by the user.
"""
if self.is_setup:
return
async with self.lock:
async with self.conn.cursor(binary=True) as cur:
try:
@@ -89,8 +84,6 @@ class AsyncPostgresSaver(BasePostgresSaver):
if self.pipe:
await self.pipe.sync()
self.is_setup = True
async def alist(
self,
config: Optional[RunnableConfig],