[Agent][Deploy] - image download pinch
This commit is contained in:
@@ -324,10 +324,12 @@ func PullFromFullNameList(fullImageNameList []string) (errorPullImageList []stri
|
|||||||
|
|
||||||
start := time.Now()
|
start := time.Now()
|
||||||
for _, fullImageName := range fullImageNameList {
|
for _, fullImageName := range fullImageNameList {
|
||||||
if strings.HasPrefix(fullImageName, "harbor.cdcyy.com.cn") {
|
if !strings.HasPrefix(fullImageName, "harbor.cdcyy.com.cn") {
|
||||||
since := time.Since(start)
|
since := time.Since(start)
|
||||||
if since < 60*time.Second {
|
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()
|
start = time.Now()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user