|
|
|
@@ -93,8 +93,8 @@ func GetCloudbrainTask(ctx *context.APIContext) { |
|
|
|
} |
|
|
|
|
|
|
|
func CloudbrainGetLog(ctx *context.Context) { |
|
|
|
jobID := ctx.Params(":jobid") |
|
|
|
_, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
jobName := ctx.Params(":jobname") |
|
|
|
job, err := models.GetCloudbrainByName(jobName) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainByJobID failed: %v", err, ctx.Data["MsgID"]) |
|
|
|
ctx.ServerError(err.Error(), err) |
|
|
|
@@ -102,7 +102,7 @@ func CloudbrainGetLog(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
var hits []models.Hits |
|
|
|
result, err := cloudbrain.GetJobLog(jobID) |
|
|
|
result, err := cloudbrain.GetJobLog(job.JobID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetJobLog failed: %v", err, ctx.Data["MsgID"]) |
|
|
|
ctx.ServerError(err.Error(), err) |
|
|
|
@@ -141,7 +141,7 @@ func CloudbrainGetLog(ctx *context.Context) { |
|
|
|
} |
|
|
|
|
|
|
|
ctx.JSON(http.StatusOK, map[string]interface{}{ |
|
|
|
"JobID": jobID, |
|
|
|
"JobName": jobName, |
|
|
|
"Content": content, |
|
|
|
}) |
|
|
|
|
|
|
|
|