|
|
|
@@ -118,7 +118,7 @@ func StopAiSafetyTask(ctx *context.Context) { |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
task, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
result := make(map[string]interface{}) |
|
|
|
result["code"] = -1 |
|
|
|
result["result_code"] = -1 |
|
|
|
if err != nil { |
|
|
|
log.Info("query task error.err=" + err.Error()) |
|
|
|
log.Error("GetCloudbrainByJobID failed:" + err.Error()) |
|
|
|
@@ -192,6 +192,8 @@ func StopAiSafetyTask(ctx *context.Context) { |
|
|
|
log.Info("The job is finished. status=" + task.Status) |
|
|
|
} |
|
|
|
} |
|
|
|
result["msg"] = "succeed" |
|
|
|
ctx.JSON(200, result) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|