Add Force reset to clear stuck jobs and kill a wedged Comfy.

Settings and the header menu can cancel invisible queue/pending work and force-stop Beast when Sleep is blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-03 21:24:10 -05:00
co-authored by Cursor
parent ea66ed8e3d
commit 5df9e2d8ac
5 changed files with 194 additions and 16 deletions
+15
View File
@@ -0,0 +1,15 @@
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 stuck jobs and force-stopped Comfy. Use Wake / Poke when you want the GPU again.',
cleared,
comfy
}
})