Keep remaining multi-shot clips on a Queue page so prompts can be edited between shots, with process-next or overnight run-all.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { pauseShotQueue, setQueueJob } from '~/server/utils/shotQueue'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const body = await readBody<{ jobId?: string; kind?: string }>(event).catch(() => ({}))
|
||||
const jobId = String(body?.jobId || '')
|
||||
@@ -6,6 +8,12 @@ export default defineEventHandler(async (event) => {
|
||||
job.status = 'cancelled'
|
||||
emitJob(job, { type: 'status', message: 'Cancelling job...' })
|
||||
removeExtendTemp(job.library?.extendTmpDir)
|
||||
if (job.library?.queueId) {
|
||||
job.library.stopAfterCurrent = true
|
||||
job.library.queueAutoRun = false
|
||||
await pauseShotQueue(job.library.ownerKey, job.library.queueId).catch(() => null)
|
||||
setQueueJob(job.library.queueId, null)
|
||||
}
|
||||
}
|
||||
if (jobId) deletePendingJob(jobId)
|
||||
const ok = await interruptComfy()
|
||||
|
||||
Reference in New Issue
Block a user