| @@ -307,8 +307,8 @@ func UpdateModelSize(modeluuid string) { | |||||
| model, err := models.QueryModelById(modeluuid) | model, err := models.QueryModelById(modeluuid) | ||||
| if err == nil { | if err == nil { | ||||
| if model.Type == models.TypeCloudBrainOne { | if model.Type == models.TypeCloudBrainOne { | ||||
| if strings.HasPrefix(model.Path, setting.Bucket+"/"+Model_prefix) { | |||||
| files, err := storage.GetAllObjectByBucketAndPrefixMinio(setting.Bucket, model.Path[len(setting.Bucket)+1:]) | |||||
| if strings.HasPrefix(model.Path, setting.Attachment.Minio.Bucket+"/"+Model_prefix) { | |||||
| files, err := storage.GetAllObjectByBucketAndPrefixMinio(setting.Attachment.Minio.Bucket, model.Path[len(setting.Attachment.Minio.Bucket)+1:]) | |||||
| if err != nil { | if err != nil { | ||||
| log.Info("Failed to query model size from minio. id=" + modeluuid) | log.Info("Failed to query model size from minio. id=" + modeluuid) | ||||
| } | } | ||||
| @@ -325,6 +325,8 @@ func UpdateModelSize(modeluuid string) { | |||||
| models.ModifyModelSize(modeluuid, size) | models.ModifyModelSize(modeluuid, size) | ||||
| } | } | ||||
| } | } | ||||
| } else { | |||||
| log.Info("not found model,uuid=" + modeluuid) | |||||
| } | } | ||||
| } | } | ||||