1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-24 14:31:44 +01:00

perf: fixes an issue with too many containers (#3144)

This commit is contained in:
Amir Raminfar
2024-07-24 06:58:21 -07:00
committed by GitHub
parent 4aa315a471
commit 082bed2382
16 changed files with 136 additions and 173 deletions

View File

@@ -71,16 +71,7 @@ func (d *dockerClientService) StreamLogs(ctx context.Context, container docker.C
}
func (d *dockerClientService) FindContainer(id string) (docker.Container, error) {
container, err := d.store.FindContainer(id)
if err != nil {
if err == docker.ErrContainerNotFound {
return d.client.FindContainer(id)
} else {
return docker.Container{}, err
}
}
return container, nil
return d.store.FindContainer(id)
}
func (d *dockerClientService) ContainerAction(container docker.Container, action docker.ContainerAction) error {