Browse Source

增加查询训练任务的接口。

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

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

@@ -261,7 +261,7 @@ func QueryTrainJobList(ctx *context.Context) {
log.Info("query train job list. start.")
repoId := ctx.QueryInt64("repoId")

VersionListTasks, VersionListCount, err := models.CloudbrainsVersionList(&models.CloudbrainsOptions{
VersionListTasks, count, err := models.CloudbrainsVersionList(&models.CloudbrainsOptions{
ListOptions: models.ListOptions{
Page: -1,
PageSize: -1,
@@ -272,7 +272,14 @@ func QueryTrainJobList(ctx *context.Context) {
JobID: "",
})

ctx.JSON(200, VersionListTasks)
log.Info("query return count=" + fmt.Sprint(count))

if err != nil {
ctx.ServerError("QueryTrainJobList:", err)
} else {
ctx.JSON(200, VersionListTasks)
}

}

func DownloadSingleModelFile(ctx *context.Context) {


Loading…
Cancel
Save