Merge branch 'theRealBassist-fix-container-lifetime-check'

This commit is contained in:
Henry Dollman
2024-08-20 14:23:50 -04:00

View File

@@ -192,7 +192,7 @@ func (a *Agent) getDockerStats() ([]*container.Stats, error) {
validIds[ctr.IdShort] = struct{}{}
// check if container is less than 1 minute old (possible restart)
// note: can't use Created field because it's not updated on restart
if strings.HasSuffix(ctr.Status, "seconds") {
if strings.Contains(ctr.Status, "second") {
// if so, remove old container data
a.deleteContainerStatsSync(ctr.IdShort)
}