Files
aigen/server/api/health.get.ts
T
TowstyandCursor f5829995c8 Start ComfyUI automatically before queueing MiniMax jobs.
Health-check /system_stats, wait if the desktop is booting or busy, and start the host instance when it is fully offline.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 19:39:28 -05:00

13 lines
352 B
TypeScript

export default defineEventHandler(async () => {
const comfy = await checkComfyHttp().catch(() => ({ ok: false, host: '', stats: null }))
return {
ok: true,
service: useRuntimeConfig().public.instanceName || 'aigen',
comfy: {
ok: comfy.ok,
host: comfy.host || '',
stats: comfy.ok ? comfy.stats : undefined
}
}
})