feat: remove old containers
This commit is contained in:
parent
6929a86485
commit
2a477f49a2
7
store.go
7
store.go
|
@ -21,6 +21,10 @@ func storeContainers(c *client.Client, containers []types.Container) {
|
||||||
lock.Lock()
|
lock.Lock()
|
||||||
defer lock.Unlock()
|
defer lock.Unlock()
|
||||||
|
|
||||||
|
for _, container := range containers {
|
||||||
|
delete(store, container.ID)
|
||||||
|
}
|
||||||
|
|
||||||
for _, container := range containers {
|
for _, container := range containers {
|
||||||
if container.State != "running" {
|
if container.State != "running" {
|
||||||
continue
|
continue
|
||||||
|
@ -40,7 +44,4 @@ func storeContainers(c *client.Client, containers []types.Container) {
|
||||||
|
|
||||||
store[container.ID] = dumper
|
store[container.ID] = dumper
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove old containers
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue