From 4938cc8985ce8d8cefd290c6376a009a0f16f942 Mon Sep 17 00:00:00 2001 From: kisfenyo Date: Sun, 14 Jun 2026 09:49:05 +0200 Subject: [PATCH] F7: tighten status-refresh cadence 30s->10s (dashboard state lag) The dashboard stacks list served the in-memory map refreshed by a 30s ticker, so container state lagged Docker health by up to ~30s after a deploy. RefreshStatus is a cheap docker-ps refresh; 10s (matching health-probes) cuts the lag without loading Docker. --- controller/cmd/controller/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controller/cmd/controller/main.go b/controller/cmd/controller/main.go index 4e64da4..9d8f0df 100644 --- a/controller/cmd/controller/main.go +++ b/controller/cmd/controller/main.go @@ -253,7 +253,11 @@ func main() { sched.SetDebug(cfg.Logging.Level == "debug") // Existing periodic tasks (migrated from ad-hoc goroutines) - sched.Every("status-refresh", 30*time.Second, func(ctx context.Context) error { + // F7: 30s left the dashboard list lagging Docker health by up to ~30s after a deploy/state change. + // 10s (matching the health-probes cadence) tightens it; RefreshStatus is a cheap `docker ps`-based + // refresh of the in-memory map, so 10s does not meaningfully load Docker. (The deploy page itself + // already polls per-stack every 3s; this is for the dashboard/stacks list.) + sched.Every("status-refresh", 10*time.Second, func(ctx context.Context) error { return stackMgr.RefreshStatus() }) sched.Every("stack-scan", 2*time.Minute, func(ctx context.Context) error {