mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Changes as per review
This commit is contained in:
parent
98357e07a0
commit
31d080d909
3 changed files with 8 additions and 2 deletions
|
|
@ -467,7 +467,6 @@ func (c *DockerCommand) RefreshImages() error {
|
|||
ownImages := make([]*Image, len(images))
|
||||
|
||||
for i, image := range images {
|
||||
// func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error)
|
||||
|
||||
firstTag := ""
|
||||
tags := image.RepoTags
|
||||
|
|
|
|||
|
|
@ -197,6 +197,11 @@ type UpdateConfig struct {
|
|||
// It expects a valid duration like: 100ms, 2s, 200ns
|
||||
// for docs see: https://golang.org/pkg/time/#ParseDuration
|
||||
DockerRefreshInterval time.Duration `yaml:"dockerRefreshInterval,omitempty"`
|
||||
|
||||
// ImageRefreshInterval determines the time betweens updates of docker images
|
||||
// It expects a valid duration like: 100ms, 2s, 200ns
|
||||
// for docs see: https://golang.org/pkg/time/#ParseDuration
|
||||
ImageRefreshInterval time.Duration `yaml:"imageRefreshInterval,omitempty"`
|
||||
}
|
||||
|
||||
// GraphConfig specifies how to make a graph of recorded container stats
|
||||
|
|
@ -398,6 +403,7 @@ func GetDefaultConfig() UserConfig {
|
|||
OS: GetPlatformDefaultConfig(),
|
||||
Update: UpdateConfig{
|
||||
DockerRefreshInterval: time.Millisecond * 100,
|
||||
ImageRefreshInterval: time.Millisecond * 30000,
|
||||
},
|
||||
Stats: StatsConfig{
|
||||
MaxDuration: duration,
|
||||
|
|
|
|||
|
|
@ -241,12 +241,13 @@ func (gui *Gui) Run() error {
|
|||
gui.waitForIntro.Add(1)
|
||||
|
||||
dockerRefreshInterval := gui.Config.UserConfig.Update.DockerRefreshInterval
|
||||
imageRefeshInterval := gui.Config.UserConfig.Update.ImageRefreshInterval
|
||||
go func() {
|
||||
gui.waitForIntro.Wait()
|
||||
gui.goEvery(time.Millisecond*30, gui.reRenderMain)
|
||||
gui.goEvery(dockerRefreshInterval, gui.refreshProject)
|
||||
gui.goEvery(dockerRefreshInterval, gui.refreshContainersAndServices)
|
||||
gui.goEvery(time.Millisecond*30000, gui.refreshImages)
|
||||
gui.goEvery(imageRefeshInterval, gui.refreshImages)
|
||||
gui.goEvery(dockerRefreshInterval, gui.refreshVolumes)
|
||||
gui.goEvery(time.Millisecond*1000, gui.DockerCommand.UpdateContainerDetails)
|
||||
gui.goEvery(time.Millisecond*1000, gui.checkForContextChange)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue