MCPcopy
hub / github.com/Agenta-AI/agenta / core_session

Method core_session

api/oss/src/dbs/postgres/shared/engine.py:71–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

69
70 @asynccontextmanager
71 async def core_session(self) -> AsyncGenerator[AsyncSession, None]:
72 session: AsyncSession = self.async_core_session()
73
74 try:
75 yield session
76 await session.commit()
77
78 except Exception as e:
79 await session.rollback()
80 raise e
81
82 finally:
83 await session.close()
84
85 @asynccontextmanager
86 async def tracing_session(self) -> AsyncGenerator[AsyncSession, None]:

Calls 2

closeMethod · 0.80
commitMethod · 0.45