Finish the current video shot list before starting the next queued video.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -320,7 +320,11 @@ export async function prepareQueueBurst(owner: string, id: string, count: number
|
||||
if (activeJobs.has(queue.id)) {
|
||||
throw createError({ statusCode: 409, statusMessage: 'This batch is already processing' })
|
||||
}
|
||||
const remaining = queue.segments.filter(segment => segment.status === 'pending' || segment.status === 'error')
|
||||
const remaining = queue.segments.filter(segment => (
|
||||
segment.status === 'pending'
|
||||
|| segment.status === 'error'
|
||||
|| (segment.status === 'running' && !activeJobs.has(queue.id))
|
||||
))
|
||||
if (!remaining.length) {
|
||||
throw createError({ statusCode: 400, statusMessage: 'No remaining shots to process' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user