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
+7 -1
View File
@@ -1869,8 +1869,9 @@ export async function toggleStudioQueuePause(owner: string, options: {
}
export async function onStudioQueueBurstStarted(owner: string, queueId: string, liveJobId: string) {
const { isShotQueueCancelled } = await import('~/server/utils/shotQueue')
const { isShotQueueCancelled, getShotQueue } = await import('~/server/utils/shotQueue')
if (isShotQueueCancelled(queueId)) return
const queue = getShotQueue(owner, queueId)
await mutateStore(owner, (store) => {
const row = store.jobs.find(job => job.shotQueueId === queueId)
if (!row || row.status === 'cancelled') {
@@ -1882,6 +1883,11 @@ export async function onStudioQueueBurstStarted(owner: string, queueId: string,
row.pauseAfterCurrent = false
row.pausedByUser = false
row.holdForCutIn = false
// Run remaining / auto-run bursts must resume the rest without another click.
if (queue?.autoRun === true) {
row.resumeAutoRun = true
row.payload.queueAutoRun = true
}
row.updatedAt = Date.now()
syncPausedFlag(store)
})