mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-18 09:17:49 +08:00
progress: fix missing last progress from loading layers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
5c5bc510ac
commit
875e717361
@ -55,19 +55,21 @@ func fromReader(l progress.SubLogger, rc io.ReadCloser) error {
|
|||||||
Started: &now,
|
Started: &now,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
timeDelta := time.Since(st.Timestamp)
|
|
||||||
if timeDelta < minTimeDelta {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
st.Timestamp = time.Now()
|
|
||||||
if jm.Status == "Loading layer" {
|
if jm.Status == "Loading layer" {
|
||||||
st.Current = jm.Progress.Current
|
st.Current = jm.Progress.Current
|
||||||
st.Total = jm.Progress.Total
|
st.Total = jm.Progress.Total
|
||||||
}
|
}
|
||||||
|
now := time.Now()
|
||||||
if jm.Error != nil {
|
if jm.Error != nil {
|
||||||
now := time.Now()
|
|
||||||
st.Completed = &now
|
st.Completed = &now
|
||||||
|
} else {
|
||||||
|
timeDelta := time.Since(st.Timestamp)
|
||||||
|
if timeDelta < minTimeDelta {
|
||||||
|
started[id] = st
|
||||||
|
continue
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
st.Timestamp = now
|
||||||
started[id] = st
|
started[id] = st
|
||||||
l.SetStatus(&st)
|
l.SetStatus(&st)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user