chore: update debugging output

This commit is contained in:
Ben Allfree 2023-12-02 14:15:47 +00:00
parent b1af67b915
commit aa08397db7

View File

@ -357,17 +357,17 @@ export const instanceService = mkSingleton(
}
{
tm.repeat(async () => {
raw(`idle check: ${openRequestCount} open requests`)
dbg(`idle check: ${openRequestCount} open requests`)
if (
openRequestCount === 0 &&
lastRequest + DAEMON_PB_IDLE_TTL() < now()
) {
dbg(`idle for ${DAEMON_PB_IDLE_TTL()}, shutting down`)
info(`idle for ${DAEMON_PB_IDLE_TTL()}, shutting down`)
healthyGuard()
await _safeShutdown().catch(error)
return false
} else {
raw(`${openRequestCount} requests remain open`)
dbg(`${openRequestCount} requests remain open`)
}
return true
}, RECHECK_TTL)