Files
aigen/server/api/comfy/force-reset.post.ts
T
TowstyandCursor 780b407b3c Add Force clear for stuck queues including running YuE jobs.
Queue page and Music get a nuclear clear that cancels studio/live work, wipes shot batches, and force-stops Comfy so images/video/other music can run again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 23:03:05 -05:00

16 lines
569 B
TypeScript

import { libraryOwnerKey } from '~/server/utils/library'
import { requestComfyForceReset } from '~/server/utils/comfyLifecycle'
import { clearStuckStudioWork } from '~/server/utils/studioQueue'
export default defineEventHandler(async (event) => {
const owner = libraryOwnerKey(event)
const cleared = await clearStuckStudioWork(owner)
const comfy = await requestComfyForceReset()
return {
ok: true,
message: 'Cleared every stuck Studio/music/shot job and force-stopped Comfy. Use Wake / Poke when you want the GPU again.',
cleared,
comfy
}
})