Reset Job
POST/api/v1/jobs/:job_id/reset
Reset job status back to 'queued' without deleting generated artifacts.
Safe to call when the SSE stream connection was lost mid-execution and the job is permanently stuck in 'running' state.
重置前先终止旧 runner 并清理其锁(best-effort):不清理时旧进程持有的 Redis 租约 + flock 会让 job_lock_active() 一直为真,调度器每个 tick 选中 该 job 又跳过 dispatch,重置后的 job 卡在 queued 直到旧进程自然退出 (job 5732 gatsby 实录,2026-07-13)。顺序:kill 进程 → 删租约 → 删锁文件。
Request
Responses
- 200
- 422
Successful Response
Validation Error