mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
避免uncache公有云镜像失败
This commit is contained in:
@@ -46,7 +46,7 @@ func (self *StorageUncacheImageTask) OnInit(ctx context.Context, obj db.IStandal
|
||||
|
||||
scimg := models.StoragecachedimageManager.Register(ctx, self.UserCred, storageCache.Id, imageId, "")
|
||||
|
||||
if scimg == nil || len(scimg.Path) == 0 {
|
||||
if scimg == nil || (len(scimg.Path) == 0 && len(scimg.ExternalId) == 0) {
|
||||
// "image is not cached on this storage"
|
||||
self.OnImageUncacheComplete(ctx, storageCache, nil)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user