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:
@@ -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)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user