Add batch still arrows, hide output only on tap, and cut studio lag.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,7 +3,11 @@ import { comfyConfigured } from '~/server/utils/comfy'
|
||||
import { imageComfyConfigured, getBeastImageHost, getSidecarImageHost, sameImageHost } from '~/server/utils/imageComfy'
|
||||
import { checkImageComfyHttp, fetchQueueAt } from '~/server/utils/imageComfyLifecycle'
|
||||
|
||||
let healthCache: { at: number; body: Record<string, unknown> } | null = null
|
||||
const HEALTH_CACHE_MS = 2500
|
||||
|
||||
export default defineEventHandler(async () => {
|
||||
if (healthCache && Date.now() - healthCache.at < HEALTH_CACHE_MS) return healthCache.body
|
||||
const videoConfigured = comfyConfigured()
|
||||
const imageConfigured = imageComfyConfigured()
|
||||
const beastHost = getBeastImageHost()
|
||||
@@ -35,7 +39,7 @@ export default defineEventHandler(async () => {
|
||||
const preferredHost = beastHost || comfy.host || ''
|
||||
const promptQueueRunning = promptIsBeast ? ((beastQueue.running || queue.running) || 0) : (promptQueue.running || 0)
|
||||
const promptQueuePending = promptIsBeast ? ((beastQueue.pending || queue.pending) || 0) : (promptQueue.pending || 0)
|
||||
return {
|
||||
const body = {
|
||||
ok: true,
|
||||
service: useRuntimeConfig().public.instanceName || 'aigen',
|
||||
comfy: {
|
||||
@@ -75,4 +79,6 @@ export default defineEventHandler(async () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
healthCache = { at: Date.now(), body }
|
||||
return body
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user