Let clips move between folders, save busy jobs, and fail dropped Comfy runs.
Held jobs restore the form after a 3-minute wait, hidden stills stay blurred in the picker, and reloading Comfy no longer leaves xaigen spinning. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
import { checkComfyHttp, fetchQueue } from '~/server/utils/comfyLifecycle'
|
||||
|
||||
export default defineEventHandler(async () => {
|
||||
const comfy = await checkComfyHttp().catch(() => ({ ok: false, host: '', stats: null }))
|
||||
const [comfy, queue] = await Promise.all([
|
||||
checkComfyHttp().catch(() => ({ ok: false, host: '', stats: null })),
|
||||
fetchQueue()
|
||||
])
|
||||
const busy = Boolean(comfy.ok && queue.running > 0)
|
||||
return {
|
||||
ok: true,
|
||||
service: useRuntimeConfig().public.instanceName || 'aigen',
|
||||
comfy: {
|
||||
ok: comfy.ok,
|
||||
busy,
|
||||
host: comfy.host || '',
|
||||
queueRunning: queue.running,
|
||||
queuePending: queue.pending,
|
||||
stats: comfy.ok ? comfy.stats : undefined
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user