mirror of
https://github.com/fankes/beszel.git
synced 2025-10-20 02:09:28 +08:00
fix: correct typo in Docker stats collection variable name
This commit is contained in:
@@ -77,7 +77,7 @@ func (dm *dockerManager) getDockerStats() ([]*container.Stats, error) {
|
|||||||
clear(dm.validIds)
|
clear(dm.validIds)
|
||||||
}
|
}
|
||||||
|
|
||||||
var failedContainters []container.ApiInfo
|
var failedContainers []container.ApiInfo
|
||||||
|
|
||||||
for _, ctr := range *dm.apiContainerList {
|
for _, ctr := range *dm.apiContainerList {
|
||||||
ctr.IdShort = ctr.Id[:12]
|
ctr.IdShort = ctr.Id[:12]
|
||||||
@@ -96,7 +96,7 @@ func (dm *dockerManager) getDockerStats() ([]*container.Stats, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
dm.containerStatsMutex.Lock()
|
dm.containerStatsMutex.Lock()
|
||||||
delete(dm.containerStatsMap, ctr.IdShort)
|
delete(dm.containerStatsMap, ctr.IdShort)
|
||||||
failedContainters = append(failedContainters, ctr)
|
failedContainers = append(failedContainers, ctr)
|
||||||
dm.containerStatsMutex.Unlock()
|
dm.containerStatsMutex.Unlock()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@@ -105,9 +105,9 @@ func (dm *dockerManager) getDockerStats() ([]*container.Stats, error) {
|
|||||||
dm.wg.Wait()
|
dm.wg.Wait()
|
||||||
|
|
||||||
// retry failed containers separately so we can run them in parallel (docker 24 bug)
|
// retry failed containers separately so we can run them in parallel (docker 24 bug)
|
||||||
if len(failedContainters) > 0 {
|
if len(failedContainers) > 0 {
|
||||||
slog.Debug("Retrying failed containers", "count", len(failedContainters))
|
slog.Debug("Retrying failed containers", "count", len(failedContainers))
|
||||||
for _, ctr := range failedContainters {
|
for _, ctr := range failedContainers {
|
||||||
dm.queue()
|
dm.queue()
|
||||||
go func() {
|
go func() {
|
||||||
defer dm.dequeue()
|
defer dm.dequeue()
|
||||||
|
Reference in New Issue
Block a user