Browse Source

#3364

repo-square:fix bug
tags/v1.22.12.1^2
chenyifan01 3 years ago
parent
commit
72150f8f03
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      routers/repo/ai_model_manage.go

+ 7
- 3
routers/repo/ai_model_manage.go View File

@@ -122,9 +122,6 @@ func saveModelByParameters(jobId string, versionName string, name string, versio
if err != nil {
return "", err
}
if modelSize > 0 {
go repository.IncreaseRepoModelNum(aiTask.RepoID)
}
if len(lastNewModelId) > 0 {
//udpate status and version count
models.ModifyModelNewProperty(lastNewModelId, MODEL_NOT_LATEST, 0)
@@ -178,6 +175,13 @@ func updateStatus(id string, modelSize int64, status int, modelPath string, stat
if err != nil {
log.Info("update status error." + err.Error())
}
m, err := models.QueryModelById(id)
if err == nil {
if modelSize > 0 && m.Size == 0 {
go repository.IncreaseRepoModelNum(m.RepoId)
}
}

}

func SaveNewNameModel(ctx *context.Context) {


Loading…
Cancel
Save