Reattach Comfy watchers after refresh so pending jobs finish and save.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
export default defineEventHandler(async (event) => {
|
||||
const id = getRouterParam(event, 'id')
|
||||
const job = id ? getJob(id) : undefined
|
||||
let job = id ? getJob(id) : undefined
|
||||
if (!job && id) {
|
||||
const pending = readPendingJob(id)
|
||||
if (pending) job = ensurePendingWatch(pending)
|
||||
}
|
||||
if (!job) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'Job not found' })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user