fix(queue): link-only 再次下载回到 queued + 执行计划状态
This commit is contained in:
1 parent
a0f86bf09c
commit
9edc635ed8
3 files changed
+10
-1
No files matched your search
@@ -101,3 +101,8 @@
|
||||
## 8. 交付节奏
|
||||
|
||||
- 代码 + 本地验证完成 → 通知用户,**不构建**;等用户确认后再 bump 版本、出测试包、发插件市场。
|
||||
|
||||
## 9. 实施状态(2026-12-03)
|
||||
|
||||
- 已完成:宿主 `queue`/`pages` 能力、账本 meta/独立文件 `library/task-queue/index.json`、上限配置 `canvas.taskQueueMax`、左栏整页插件 `taskqueue 1.0.0`、下载落地/预览/定位/复制链接/清空/重试、真实应用页面与注入记录验证。
|
||||
- 待确认:bump 版本、出测试包、上传插件市场(taskqueue 1.0.0)。
|
||||
+1
-1
@@ -150,7 +150,7 @@
|
||||
const id = String(src.id || ('u_' + hash(url)))
|
||||
const exist = entries.get(id)
|
||||
if (exist) {
|
||||
if (exist.status === STATE.FAILED) return retry(id)
|
||||
if (exist.status === STATE.FAILED || exist.status === STATE.LINK_ONLY) return retry(id)
|
||||
return publicView(exist)
|
||||
}
|
||||
const e = {
|
||||
|
||||
@@ -111,6 +111,10 @@ async function main () {
|
||||
const r = ingest.release(e.id)
|
||||
ok('⑥-1 变为 link-only', r.status === 'link-only')
|
||||
ok('⑥-2 引用被清空但 url 保留', r.ref === null && r.url === 'https://cdn/rel.png')
|
||||
// 任务队列「下载」会再次 enqueue 同 url:link-only 必须回到 queued(否则永远不下)
|
||||
const again = ingest.enqueue({ url: 'https://cdn/rel.png' })
|
||||
ok('⑥-3 link-only 再次 enqueue → queued', again && again.status === 'queued', again && again.status)
|
||||
await until(() => ingest.get(e.id).status === 'ready', 2000)
|
||||
}
|
||||
|
||||
// ⑦ 启动恢复:downloading/queued 重排,ready 保持
|
||||
|
||||
Reference in new issue
Block a user