fix(region): skip cloud image sync error

This commit is contained in:
Qu Xuan
2020-12-28 14:29:58 +08:00
parent 4f9d6d2005
commit 5aa763fd0a
+2 -2
View File
@@ -832,9 +832,9 @@ func (self *SStoragecache) unlinkCloudimages(ctx context.Context, userCred mccli
return errors.Wrapf(err, "db.FetchModelObjects")
}
for i := range scis {
err = scis[i].Detach(ctx, userCred)
err = scis[i].Delete(ctx, userCred)
if err != nil {
return errors.Wrapf(err, "scis[i].Detach")
log.Warningf("detach image %v error: %v", scis[i].GetCachedimage(), err)
}
}
if len(scis) > 0 {