fix: health check always returning not ready
This commit is contained in:
parent
12c36572a5
commit
fac5603daf
1 changed files with 5 additions and 0 deletions
|
|
@ -222,6 +222,11 @@ func Run(debug bool, homePath, configPath string, allowEmptyStartup bool) (runEr
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// All services (channels + shared HTTP server) are up; mark the health
|
||||||
|
// server ready so GET /ready reports "ready". The health endpoints are
|
||||||
|
// mounted on the shared gateway mux, so Health.Server.Start() (which would
|
||||||
|
// otherwise set this) is never called — we flip the flag explicitly here.
|
||||||
|
runningServices.HealthServer.SetReady(true)
|
||||||
publishGatewayEvent(agentLoop, runtimeevents.KindGatewayReady, startedAt, nil)
|
publishGatewayEvent(agentLoop, runtimeevents.KindGatewayReady, startedAt, nil)
|
||||||
closeListeners = false
|
closeListeners = false
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue