From 7e1455161d7d77659d589a2bd5ad34a1811d90d0 Mon Sep 17 00:00:00 2001 From: Henry Dollman Date: Tue, 20 Aug 2024 14:23:24 -0400 Subject: [PATCH] update container status check --- beszel/internal/agent/agent.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beszel/internal/agent/agent.go b/beszel/internal/agent/agent.go index b0823c1..3e3fd28 100644 --- a/beszel/internal/agent/agent.go +++ b/beszel/internal/agent/agent.go @@ -191,9 +191,8 @@ func (a *Agent) getDockerStats() ([]*container.Stats, error) { ctr.IdShort = ctr.Id[:12] validIds[ctr.IdShort] = struct{}{} // check if container is less than 1 minute old (possible restart) - // also check if container health is listed as starting to catch potential boot loops // note: can't use Created field because it's not updated on restart - if strings.Contains(ctr.Status, "seconds") || strings.Contains(ctr.Status, "starting") { + if strings.Contains(ctr.Status, "second") { // if so, remove old container data a.deleteContainerStatsSync(ctr.IdShort) }