Browse Source

Merge branch 'gpu-inference' of git.openi.org.cn:OpenI/aiforge into gpu-inference

pull/2458/head
zhoupzh 2 years ago
parent
commit
9878c5fcc3
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      routers/api/v1/repo/cloudbrain.go

+ 11
- 2
routers/api/v1/repo/cloudbrain.go View File

@@ -149,13 +149,22 @@ func GetCloudBrainInferenceJob(ctx *context.APIContext) {

func DelCloudBrainJob(ctx *context.APIContext) {
jobID := ctx.Params(":jobid")
var versionName = ctx.Query("version_name")

errStr := cloudbrain.DelCloudBrainJob(jobID)

if errStr != "" {
ctx.JSON(http.StatusOK, models.BaseErrorMessage(ctx.Tr(errStr)))
ctx.JSON(http.StatusOK, map[string]interface{}{
"Message": ctx.Tr(errStr),
"VersionName": versionName,
"code": 1,
})
} else {
ctx.JSON(http.StatusOK, models.BaseOKMessage)
ctx.JSON(http.StatusOK, map[string]interface{}{
"Message": "",
"VersionName": versionName,
"code": 0,
})
}

}


Loading…
Cancel
Save