Fix studio queue stuck after GPU sleep: clear ghost live ownership so Start now and wake can actually dispatch.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-04 23:15:19 -05:00
co-authored by Cursor
parent 2435167a41
commit 34c39bf85d
3 changed files with 157 additions and 49 deletions
+4 -3
View File
@@ -4009,6 +4009,7 @@ async function pokeGpu() {
while (Date.now() < deadline) {
await pollComfyHealth()
if (comfyOk.value || imageComfyOk.value) {
await refreshStudioQueue().catch(() => null)
gpuWaking.value = false
return
}
@@ -5435,7 +5436,7 @@ async function cutInStudioJob(id: string) {
? 'Starting now.'
: (result.deferred
? 'This job will run after the current shot, as its own clip.'
: 'Queued to start as soon as the GPU is free.'))
: 'Still waiting — try Start now again in a moment.'))
await refreshStudioQueue()
} catch (error: any) {
toast(error?.data?.statusMessage || error?.statusMessage || 'Could not move that job next')
@@ -5444,8 +5445,8 @@ async function cutInStudioJob(id: string) {
async function retryStudioJob(id: string) {
try {
await $fetch(`/api/studio-queue/${id}/retry`, { method: 'POST' })
toast('Queued to run as soon as the GPU is free.')
const result = await $fetch<{ started?: boolean }>(`/api/studio-queue/${id}/retry`, { method: 'POST' })
toast(result.started ? 'Starting now.' : 'Queued to run as soon as the GPU is free.')
await refreshStudioQueue()
} catch (error: any) {
toast(error?.data?.statusMessage || error?.statusMessage || 'Could not retry that job')