mirror of
https://github.com/fankes/beszel.git
synced 2025-10-19 01:39:34 +08:00
update container status check
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user