Restore automatic video batch continuation and prepare stable Comfy loading

This commit is contained in:
Towsty
2026-09-09 06:58:35 -05:00
parent 4bf992210d
commit badf59d914
10 changed files with 83 additions and 21 deletions
+9 -1
View File
@@ -1808,6 +1808,10 @@ export async function toggleStudioQueuePause(owner: string, options: {
if (options.queueId && job.shotQueueId !== options.queueId) continue
job.pauseAfterCurrent = false
job.pausedByUser = false
if (job.shotQueueId && job.status !== 'complete' && job.status !== 'cancelled') {
job.resumeAutoRun = true
job.payload.queueAutoRun = true
}
}
syncPausedFlag(store)
return structuredClone(store)
@@ -1831,7 +1835,7 @@ export async function toggleStudioQueuePause(owner: string, options: {
}
const busy = await videoJobsBusy()
if (heldPaused[0] && !busy) {
await resumeHeldStudioJob(heldPaused[0]).catch(() => null)
await resumeHeldStudioJob(rows.find(row => row.id === heldPaused[0].id) || heldPaused[0]).catch(() => null)
} else {
if (heldPaused.length && busy) {
await mutate(owner, (jobs) => {
@@ -1936,6 +1940,10 @@ export async function onStudioQueueBurstStarted(owner: string, queueId: string,
if (queue?.autoRun === true) {
row.resumeAutoRun = true
row.payload.queueAutoRun = true
} else if (queue) {
// An explicit one-shot / next-three request must replace an earlier run-all policy.
row.resumeAutoRun = false
row.payload.queueAutoRun = false
}
row.updatedAt = Date.now()
syncPausedFlag(store)