Reattach Comfy watchers after refresh so pending jobs finish and save.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,14 +8,8 @@ export default defineEventHandler(async (event) => {
|
||||
if (pending) {
|
||||
const done = await resolvePendingJob(pending).catch(() => null)
|
||||
if (done) return done
|
||||
return {
|
||||
type: 'snapshot',
|
||||
status: 'running',
|
||||
message: 'Reconnecting to ComfyUI...',
|
||||
progress: 90,
|
||||
promptId: pending.promptId,
|
||||
elapsedMs: Date.now() - pending.startedAt
|
||||
}
|
||||
const job = ensurePendingWatch(pending)
|
||||
return jobSnapshot(job)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user