Fix shot auto-run: do not settle or honor stale paused mid-chain, and keep Run remaining from dying after one shot.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-05 19:52:29 -05:00
co-authored by Cursor
parent 8ebbc0fc6e
commit 4dccaac6d3
3 changed files with 33 additions and 8 deletions
+3 -3
View File
@@ -363,9 +363,9 @@ export function watchComfyJob(job: Job, options: { persist?: boolean } = {}): Pr
})
deletePendingJob(job.id)
job.saving = false
// Persist path: clear the studio "Generating" row as soon as the library save
// finishes. Waiting for runGeneration's finally used to leave jobs stuck in the queue.
if (persist && job.library?.ownerKey) {
// Only settle the studio row when this live job is done with the chain.
// Settling while chainContinuing killed overnight auto-run after every shot.
if (persist && job.library?.ownerKey && !job.library.chainContinuing) {
const { onLiveVideoSettled } = await import('~/server/utils/studioQueue')
await onLiveVideoSettled(job).catch(() => null)
}