
吉鑫升andClaude Opus 4.8
6aff165d09
fix(db): 路由跨 loop 的 DB 访问回引擎主 loop,消除 asyncmy "attached to a different loop"
会商/定时任务/沙箱工具等在 worker 线程的临时 loop 上用 asyncio.run 跑全局引擎连接池的
DB 操作,连接被绑定到随即关闭的临时 loop;池子回收/释放该连接时 asyncmy
_terminate_graceful_close 在错误的 loop 上触发 future,持续刷
"got Future attached to a different loop"。
- engine.py: 新增 run_db_blocking(fire_and_forget_db_write 的带返回值版本)。离开主 loop
时用 run_coroutine_threadsafe 把协程送回主 loop 执行、阻塞调用线程拿结果;仅在无主 loop
或正同步处于主 loop 内(送回会死锁)时退回临时 loop。
- thread_paths / prompt / skill_tools: 三处同步→异步阻塞读桥(任务owner解析/常驻技能/
技能可见性)改走 run_db_blocking,删除各自重复的 _run_coro_blocking。
- llm/tool metrics 中间件: fire-and-forget 写改走 fire_and_forget_db_write。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 15:57:04 +08:00
..
2026-06-10 11:24:21 +08:00
2026-06-16 11:07:31 +08:00
2026-06-18 17:39:19 +08:00
2026-05-17 19:50:52 +08:00
2026-06-09 17:18:40 +08:00
2026-06-18 14:26:27 +08:00
2026-06-02 20:36:22 +08:00
2026-06-12 14:51:50 +08:00
2026-06-03 11:35:38 +08:00
2026-06-12 15:40:09 +08:00
2026-06-06 00:52:24 +08:00
2026-05-21 17:34:25 +08:00
2026-06-16 23:34:12 +08:00
2026-06-20 16:28:02 +08:00
2026-06-19 22:55:56 +08:00
2026-05-18 19:34:14 +08:00
2026-06-08 22:52:18 +08:00
2026-06-16 15:23:54 +08:00
2026-05-18 19:34:14 +08:00
2026-06-16 17:59:05 +08:00
2026-06-21 17:17:19 +08:00
2026-06-22 16:36:31 +08:00
2026-06-05 11:19:09 +08:00
2026-06-22 16:36:31 +08:00
2026-06-18 15:11:50 +08:00
2026-06-22 16:36:31 +08:00
2026-06-06 00:52:24 +08:00
2026-06-16 10:49:36 +08:00
2026-06-17 18:05:07 +08:00
2026-06-16 16:37:43 +08:00
2026-06-16 14:32:21 +08:00
2026-06-19 16:09:01 +08:00
2026-06-19 20:51:05 +08:00
2026-05-18 19:34:14 +08:00
2026-06-06 00:52:24 +08:00
2026-06-16 10:49:36 +08:00
2026-06-04 12:40:18 +08:00
2026-06-16 14:32:21 +08:00
2026-05-13 14:36:44 +08:00
2026-05-13 14:36:44 +08:00
2026-06-24 15:57:04 +08:00
2026-05-19 22:54:36 +08:00