Skip to content

fix: 修复 AIaW 数据导入失败并提升导入速度 - #15

Open
idontwannagoo wants to merge 2 commits into
NitroRCr:mainfrom
idontwannagoo:codex/dev
Open

idontwannagoo wants to merge 2 commits into
NitroRCr:mainfrom
idontwannagoo:codex/dev

Conversation

@idontwannagoo

Copy link
Copy Markdown

Closes #9

原有 AIaW 导入在浏览器中逐条执行 mutation,大型导出文件耗时很长,页面进入后台或 Zero 断线后还可能中途停止;同时,旧数据中的 $root 引用会触发 entity not found。本 PR 将导入改为服务端异步任务,按每 50 个对话批量写入,并使用数据库事务保证失败时整体回滚,页面刷新后也能继续查看任务进度。

同时增加了缺失引用的容错和导入结果提示,并允许 Bun 安装 Zero 所需的 SQLite 原生依赖。相关改动已经通过类型检查、ESLint、前后端构建和小型真实数据库导入测试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

导入AIaW的数据失败

1 participant