Browse Source

add status

tags/v1.21.12.2^2
lewis 4 years ago
parent
commit
11e0ca97b9
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      routers/repo/cloudbrain.go

+ 3
- 0
routers/repo/cloudbrain.go View File

@@ -417,6 +417,7 @@ func CloudBrainStop(ctx *context.Context) {
var jobID = ctx.Params(":jobid")
var resultCode = "0"
var errorMsg = ""
var status = ""

for {
task, err := models.GetCloudbrainByJobID(jobID)
@@ -451,12 +452,14 @@ func CloudBrainStop(ctx *context.Context) {
break
}

status = task.Status
break
}

ctx.JSON(200, map[string]string{
"result_code": resultCode,
"error_msg": errorMsg,
"status": status,
})
}



Loading…
Cancel
Save