| @@ -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) | ||||
| @@ -178,6 +175,13 @@ func updateStatus(id string, modelSize int64, status int, modelPath string, stat | |||||
| if err != nil { | if err != nil { | ||||
| log.Info("update status error." + err.Error()) | 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) { | func SaveNewNameModel(ctx *context.Context) { | ||||