|
|
@@ -178,7 +178,7 @@ func updateStatus(id string, modelSize int64, status int, modelPath string, stat |
|
|
|
} |
|
|
|
if m != nil { |
|
|
|
if modelSize > 0 && m.Size == 0 { |
|
|
|
go repository.IncreaseRepoModelNum(m.RepoId) |
|
|
|
go repository.ResetRepoModelNum(m.RepoId) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@@ -337,7 +337,7 @@ func UpdateModelSize(modeluuid string) { |
|
|
|
} |
|
|
|
} |
|
|
|
if model.Size == 0 && size > 0 { |
|
|
|
go repository.IncreaseRepoModelNum(model.RepoId) |
|
|
|
go repository.ResetRepoModelNum(model.RepoId) |
|
|
|
} |
|
|
|
} else { |
|
|
|
log.Info("not found model,uuid=" + modeluuid) |
|
|
@@ -498,7 +498,7 @@ func DeleteModelFile(ctx *context.Context) { |
|
|
|
} |
|
|
|
} |
|
|
|
if (model.Size - totalSize) <= 0 { |
|
|
|
go repository.DecreaseRepoModelNum(model.RepoId) |
|
|
|
go repository.ResetRepoModelNum(model.RepoId) |
|
|
|
} |
|
|
|
} |
|
|
|
ctx.JSON(200, map[string]string{ |
|
|
@@ -569,7 +569,7 @@ func deleteModelByID(ctx *context.Context, id string) error { |
|
|
|
} |
|
|
|
} |
|
|
|
if model.Size > 0 { |
|
|
|
go repository.DecreaseRepoModelNum(model.RepoId) |
|
|
|
go repository.ResetRepoModelNum(model.RepoId) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|