Reattach Comfy watchers after refresh so pending jobs finish and save.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,17 +9,7 @@ export default defineEventHandler(async (event) => {
|
||||
if (pending) {
|
||||
const done = await resolvePendingJob(pending)
|
||||
if (done) return done
|
||||
return {
|
||||
type: 'snapshot',
|
||||
status: 'running',
|
||||
jobId,
|
||||
message: 'Reconnecting to ComfyUI...',
|
||||
progress: 90,
|
||||
promptId: pending.promptId,
|
||||
elapsedMs: Date.now() - pending.startedAt,
|
||||
hideThumbnail: pending.hideThumbnail,
|
||||
folderLocked: pending.folderLocked
|
||||
}
|
||||
return jobSnapshot(ensurePendingWatch(pending))
|
||||
}
|
||||
throw createError({ statusCode: 404, statusMessage: 'Job not found' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user