From ff75c2dfb3666d4b61de84c69cc59dee7b3d7fcd Mon Sep 17 00:00:00 2001 From: Wenjie Zhang Date: Mon, 15 Dec 2025 10:04:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(agents):=20=E4=B8=BAaiosqlite=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E6=B7=BB=E5=8A=A0is=5Falive=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=A1=A5=E4=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build: 在Makefile中添加etcd镜像拉取 --- Makefile | 1 + src/agents/common/base.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 07e22a6e..bf6016ea 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ pull: bash docker/pull_image.sh minio/minio:RELEASE.2023-03-20T20-16-18Z bash docker/pull_image.sh ghcr.io/astral-sh/uv:0.7.2 bash docker/pull_image.sh nginx:alpine + bash docker/pull_image.sh quay.io/coreos/etcd:v3.5.5 start: @if [ ! -f .env ]; then \ diff --git a/src/agents/common/base.py b/src/agents/common/base.py index 10b32c7b..d5f5796a 100644 --- a/src/agents/common/base.py +++ b/src/agents/common/base.py @@ -156,7 +156,11 @@ class BaseAgent: async def get_async_conn(self) -> aiosqlite.Connection: """获取异步数据库连接""" - return await aiosqlite.connect(os.path.join(self.workdir, "aio_history.db")) + conn = await aiosqlite.connect(os.path.join(self.workdir, "aio_history.db")) + # Patch: langgraph's AsyncSqliteSaver expects is_alive() method which aiosqlite may not have + if not hasattr(conn, "is_alive"): + conn.is_alive = lambda: True + return conn async def get_aio_memory(self) -> AsyncSqliteSaver: """获取异步存储实例"""