
adminandClaude Opus 4.8
7313c8a443
fix(ai-outfit): 停止生成打断当前目录行 + 「停止中…」反馈 (§19.24)
修「开始生成→几秒后停止→两个按钮都灰几十秒像卡死」:非死锁,是温和停止
在等当前目录行收尾,而 _generate_directory_outfit 一次性 submit 全部图片、
shutdown(wait=True) 等全跑完,停止信号进不到该循环;且 _stop 后无反馈。
- outfit_batch:run() 经 _accepts_should_stop 给 generate_func 传 should_stop
(= _stop_event.is_set),2-arg 才传、1-arg 仍兼容(含既有 mock)
- ai_outfit:generate_outfit_image/_generate_directory_outfit 增 should_stop;
目录循环改有界提交——始终最多 image_concurrency 张在飞,每张完成后、提交
下一张前查 should_stop,已停止则停止提交、在飞收尾即返回(结果注明
「已停止,N 张未生成」,已生成的带 output_paths)
- 面板:_OutfitWorker.gen(task, should_stop) 透传;_stop() 把停止按钮改
「停止中…」;_set_running(False) 复位「停止生成」
测试:目录行 should_stop 触发后只生成到停止点、返回「已停止」结果;2-arg
generate_func 收到 should_stop;既有用例(1-arg mock、目录并发/部分失败)保持绿。
全套 py37 通过(test_config_service 的 packaging 模板失败属并行 §19.13,无关)。
离屏冒烟:stop 截断 run 且 runner 及时返回;面板停止按钮「停止中…」→结束复位。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 16:46:49 +08:00
..
2026-06-15 15:53:01 +08:00
2026-06-18 18:03:52 +08:00
2026-06-23 14:59:04 +08:00
2026-06-23 16:46:49 +08:00
2026-06-23 16:24:34 +08:00
2026-06-23 15:59:37 +08:00
2026-06-17 16:42:20 +08:00
2026-06-22 17:35:56 +08:00
2026-06-23 11:04:38 +08:00
2026-06-22 17:49:59 +08:00
2026-06-18 11:58:06 +08:00
2026-06-22 16:57:11 +08:00
2026-06-23 16:46:49 +08:00
2026-06-16 15:11:56 +08:00
2026-06-18 11:09:29 +08:00
2026-06-16 11:21:21 +08:00