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:
@@ -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
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user