Browse Source

提交代码,修改Bug

Signed-off-by: zouap <zouap@pcl.ac.cn>
tags/v1.22.11.2^2
zouap 3 years ago
parent
commit
8d3070a379
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      routers/repo/ai_model_manage.go

+ 4
- 2
routers/repo/ai_model_manage.go View File

@@ -307,8 +307,8 @@ func UpdateModelSize(modeluuid string) {
model, err := models.QueryModelById(modeluuid)
if err == nil {
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 {
log.Info("Failed to query model size from minio. id=" + modeluuid)
}
@@ -325,6 +325,8 @@ func UpdateModelSize(modeluuid string) {
models.ModifyModelSize(modeluuid, size)
}
}
} else {
log.Info("not found model,uuid=" + modeluuid)
}
}



Loading…
Cancel
Save