Fail zombie studio jobs when Comfy's queue is empty after a restart.
A live job stuck at 8% with no Comfy prompt was treated as still owning the GPU, so waiting work never started. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -480,9 +480,11 @@ export async function isComfyPromptDropped(promptId: string) {
|
||||
if (queue.running > 0 || queue.pending > 0) return false
|
||||
const history = await fetchHistory(promptId)
|
||||
const entry = history?.[promptId] as { status?: { status_str?: string; completed?: boolean } } | undefined
|
||||
if (!entry) return false
|
||||
// Empty Comfy + no history for this id: wiped by restart/clear, or never accepted.
|
||||
if (!entry) return true
|
||||
const inspected = inspectHistory(history, promptId)
|
||||
if (inspected.video) return false
|
||||
if (extractAudio(history, promptId)) return false
|
||||
const status = entry.status?.status_str
|
||||
if (status === 'error' || status === 'interrupted') return true
|
||||
if (entry.status?.completed) return true
|
||||
|
||||
Reference in New Issue
Block a user