Stop cancelled video jobs from coming back after delete.
A leftover process-remaining wake was flipping the row back to running or error, so Remove looked like it did nothing. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,6 +13,7 @@ import { onLiveVideoSettled, onStudioQueueBurstStarted } from '~/server/utils/st
|
||||
import {
|
||||
finishQueueBurst,
|
||||
getShotQueue,
|
||||
isShotQueueCancelled,
|
||||
lastCompletedIndex,
|
||||
liveSegmentPrompt,
|
||||
prepareQueueBurst,
|
||||
@@ -515,6 +516,9 @@ export async function runGeneration(job: Job, params: VideoChainParams) {
|
||||
}
|
||||
|
||||
export async function startQueueBurst(owner: string, queueId: string, count: number | 'all') {
|
||||
if (isShotQueueCancelled(queueId)) {
|
||||
throw createError({ statusCode: 410, statusMessage: 'This batch was removed' })
|
||||
}
|
||||
await ensureComfyReady((status) => {
|
||||
console.log(JSON.stringify({
|
||||
src: 'video-chain',
|
||||
@@ -524,6 +528,9 @@ export async function startQueueBurst(owner: string, queueId: string, count: num
|
||||
message: status.message
|
||||
}))
|
||||
})
|
||||
if (isShotQueueCancelled(queueId)) {
|
||||
throw createError({ statusCode: 410, statusMessage: 'This batch was removed' })
|
||||
}
|
||||
const { queue, count: n } = await prepareQueueBurst(owner, queueId, count)
|
||||
const lastIndex = lastCompletedIndex(queue)
|
||||
const clipId = queue.currentClipId
|
||||
|
||||
Reference in New Issue
Block a user