Install any skill in seconds. Free to start, no credit card required.
Get Started Free →bytedance/knowledge-batch-task-lifecycle
覆盖批量任务完整生命周期:参数叉乘创建、猴子补丁钩子追踪队列提交与执行、状态聚合状态机、队列中断取消、文件清理删除。 导航时机:理解批量任务从创建到完成的全流程、调试端到端任务生命周期问题、修改任务状态转换、排查任务卡住、新增生命周期阶段或状态。 排除:结果处理与输出媒体处理(见 ../result-processing/)、资源上传管理、前端UI逻辑。 关键词: 批量任务生命周期, createBatchTask, cancelTask, deleteTask, post_prompt, task_start, task_done, BatchToolsHandler, SubTaskStatus, CommonTaskStatus, prompt_queue, 猴子补丁, 参数叉乘, 状态聚合, 队列执行, 文件清理, SQLite WAL。
Passed 19 of 22 test cases with the skill, and 4 of 22 without it.
and 19 more in the full report
15 fixed4 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
Under what directory path does WorkSpaceManager store the primary SQLite database file batch_tools.db?
| Checked | Without skill | With skill |
|---|---|---|
| State that the SQLite database file batch_tools.db is stored under comfyui_lumi_batcher_workspace/db/. | Missed | Passed |
The instructions your model reads when the skill loads.
批量任务生命周期域管理ComfyUI批量处理任务的完整生命周期。它是一个ComfyUI自定义节点扩展,封装ComfyUI的prompt执行系统以支持参数化批量执行:用户配置参数组合,系统计算笛卡尔积生成多个prompt变体,提交到ComfyUI队列,通过猴子补丁钩子追踪执行,跨子任务聚合状态,处理取消和清理。
lumi_batcher_service/handler/batch_tools.py — 核心API处理器(BatchToolsHandler单例),包含所有HTTP端点、参数叉乘引擎、prompt队列提交lumi_batcher_service/hooks/ — 通过猴子补丁进行生命周期事件拦截
task_start.py — 拦截执行开始事件task_done.py — 拦截执行完成、聚合状态、触发打包patch_wrpper.py — 通用猴子补丁装饰器工具lumi_batcher_service/controller/task/ — 任务操作控制器
update_prompt.py — 参数注入ComfyUI prompt图update_workflow.py — 参数注入workflow UI表示cancel_queue.py — 队列取消与中断逻辑lumi_batcher_service/common/ — 共享工具
validate_prompt.py — Prompt校验兼容包装delete_file.py — 异步并发文件删除file_path.py — 路径安全白名单校验(被handler引用)lumi_batcher_service/dao/ — SQLite数据访问层
batch_task.py — 批量任务CRUD与重启恢复batch_sub_task.py — 子任务CRUD(含重试逻辑)lumi_batcher_service/constant/task.py — 状态枚举与数据类lumi_batcher_service/thread/ — 后台线程
task_scheduler_manager.py — 线程执行工具check_status.py — 后备状态轮询线程__init__.py(项目根目录)— 扩展入口点:实例化handler、注册钩子BatchToolsHandler.__init__() 在 lumi_batcher_service/handler/batch_tools.py — 服务初始化、DB设置、路由注册、重启恢复createBatchTask POST /api/comfyui-lumi-batcher/batch-task/create — 任务创建APIcancelTask POST /api/comfyui-lumi-batcher/batch-task/cancel — 任务取消APIdeleteTask POST /api/comfyui-lumi-batcher/batch-task/delete — 任务删除API__init__.py中的batch_tools_task_start_hook()、batch_tools_task_done_hook()BatchToolsHandler通过__init__中设置的instance = None类变量使用单例模式,但没有强制保护——如果意外实例化两次,路由会被注册两次,钩子重复补丁自身,导致状态更新双重执行(lumi_batcher_service/handler/batch_tools.py)__init__中路由注册之前运行,根据已记录的计数将所有未完成任务标记为SUCCESS/PARTIAL_SUCCESS/FAILED——但重启时已排队但从未开始的子任务(PENDING)不会从子任务表中清理,遗留孤儿记录(lumi_batcher_service/handler/batch_tools.py, lumi_batcher_service/dao/batch_task.py)__init__.py, lumi_batcher_service/hooks/patch_wrpper.py)number参数控制队列优先级:-1插入队首,数值设置优先级,但post_prompt仅在未提供显式number时才递增server.PromptServer.instance.number——如果批量中所有任务都使用显式number,服务端计数器不会前进,可能导致number冲突(lumi_batcher_service/handler/batch_tools.py)lib.comfy_patch.batch_tools_patch)导入,表明存在遗留/双代码路径(lumi_batcher_service/thread/check_status.py)test cases passed, vs 4 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.