Overview: report liveness and a Source whose poll loop stopped

This commit is contained in:
2026-11-02 01:22:34 +08:00
parent a662188a57
commit b348d69beb
10 changed files with 153 additions and 13 deletions
+3 -1
View File
@@ -44,6 +44,8 @@ export interface HttpHost {
readonly health: Record<string, Health>
readonly machine: Machine
readonly masterId: string
/** When this process started serving, read by the overview's liveness readout. */
readonly startedAt: string
/** Resolves once startup finishes or setup determines what is still missing. */
readonly ready: Promise<void>
/** Resolved deployment; throws if read while waiting for setup (`!configured()`). */
@@ -160,7 +162,7 @@ function routes(runtime: HttpHost): Routes {
return {
'GET state': () => stateView(runtime),
'GET overview': () => overview(views(runtime), runtime.health, policyVersion(store.settings()),
executorLoad(store, runtime.executor.activeCount()), runtime.setupProblem ?? runtime.feishuProblem),
executorLoad(store, runtime.executor.activeCount()), runtime.setupProblem ?? runtime.feishuProblem, runtime.startedAt),
'GET search': ({ query }) => search(views(runtime), query.q ?? '', runtime.sourceLinks),
'GET sources': () => sourcesStatus(views(runtime), runtime.health, setupState(runtime)),
'GET settings': () => settingsView(store, runtime.sources, runtime.health, setupState(runtime), runtime.machine.stateDir),