Clear Generating as soon as a job saves: settle the studio row on persist and repair finished orphans so the next waiting job can start.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -363,6 +363,12 @@ export function watchComfyJob(job: Job, options: { persist?: boolean } = {}): Pr
|
||||
})
|
||||
deletePendingJob(job.id)
|
||||
job.saving = false
|
||||
// Persist path: clear the studio "Generating" row as soon as the library save
|
||||
// finishes. Waiting for runGeneration's finally used to leave jobs stuck in the queue.
|
||||
if (persist && job.library?.ownerKey) {
|
||||
const { onLiveVideoSettled } = await import('~/server/utils/studioQueue')
|
||||
await onLiveVideoSettled(job).catch(() => null)
|
||||
}
|
||||
} catch (saveError) {
|
||||
job.saving = false
|
||||
removeExtendTemp(job.library?.extendTmpDir)
|
||||
|
||||
Reference in New Issue
Block a user