Skip to content

Commit ff75c2d

Browse files
committed
fix(agents): 为aiosqlite连接添加is_alive方法补丁
build: 在Makefile中添加etcd镜像拉取
1 parent a2e2756 commit ff75c2d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ pull:
1212
bash docker/pull_image.sh minio/minio:RELEASE.2023-03-20T20-16-18Z
1313
bash docker/pull_image.sh ghcr.io/astral-sh/uv:0.7.2
1414
bash docker/pull_image.sh nginx:alpine
15+
bash docker/pull_image.sh quay.io/coreos/etcd:v3.5.5
1516

1617
start:
1718
@if [ ! -f .env ]; then \

src/agents/common/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ async def _get_checkpointer(self):
156156

157157
async def get_async_conn(self) -> aiosqlite.Connection:
158158
"""获取异步数据库连接"""
159-
return await aiosqlite.connect(os.path.join(self.workdir, "aio_history.db"))
159+
conn = await aiosqlite.connect(os.path.join(self.workdir, "aio_history.db"))
160+
# Patch: langgraph's AsyncSqliteSaver expects is_alive() method which aiosqlite may not have
161+
if not hasattr(conn, "is_alive"):
162+
conn.is_alive = lambda: True
163+
return conn
160164

161165
async def get_aio_memory(self) -> AsyncSqliteSaver:
162166
"""获取异步存储实例"""

0 commit comments

Comments
 (0)