| @@ -122,9 +122,6 @@ func saveModelByParameters(jobId string, versionName string, name string, versio | |||||
| if err != nil { | if err != nil { | ||||
| return "", err | return "", err | ||||
| } | } | ||||
| if modelSize > 0 { | |||||
| go repository.IncreaseRepoModelNum(aiTask.RepoID) | |||||
| } | |||||
| if len(lastNewModelId) > 0 { | if len(lastNewModelId) > 0 { | ||||
| //udpate status and version count | //udpate status and version count | ||||
| models.ModifyModelNewProperty(lastNewModelId, MODEL_NOT_LATEST, 0) | models.ModifyModelNewProperty(lastNewModelId, MODEL_NOT_LATEST, 0) | ||||
| @@ -174,10 +171,17 @@ func updateStatus(id string, modelSize int64, status int, modelPath string, stat | |||||
| if len(statusDesc) > 400 { | if len(statusDesc) > 400 { | ||||
| statusDesc = statusDesc[0:400] | statusDesc = statusDesc[0:400] | ||||
| } | } | ||||
| m, _ := models.QueryModelById(id) | |||||
| err := models.ModifyModelStatus(id, modelSize, status, modelPath, statusDesc) | err := models.ModifyModelStatus(id, modelSize, status, modelPath, statusDesc) | ||||
| if err != nil { | if err != nil { | ||||
| log.Info("update status error." + err.Error()) | log.Info("update status error." + err.Error()) | ||||
| } | } | ||||
| if m != nil { | |||||
| if modelSize > 0 && m.Size == 0 { | |||||
| go repository.IncreaseRepoModelNum(m.RepoId) | |||||
| } | |||||
| } | |||||
| } | } | ||||
| func SaveNewNameModel(ctx *context.Context) { | func SaveNewNameModel(ctx *context.Context) { | ||||