[Agent][Deploy] - image download pinch

This commit is contained in:
zeaslity
2024-08-26 17:06:30 +08:00
parent 0d9dea5817
commit ebed0bfc07

View File

@@ -324,10 +324,12 @@ func PullFromFullNameList(fullImageNameList []string) (errorPullImageList []stri
start := time.Now()
for _, fullImageName := range fullImageNameList {
if strings.HasPrefix(fullImageName, "harbor.cdcyy.com.cn") {
if !strings.HasPrefix(fullImageName, "harbor.cdcyy.com.cn") {
since := time.Since(start)
if since < 60*time.Second {
time.Sleep(60*time.Second - since)
duration := 60*time.Second - since
log.DebugF("PullFromFullNameList - wait for %s !", duration.String())
time.Sleep(duration)
start = time.Now()
}
}