|
|
|
@@ -82,13 +82,13 @@ func GetAiSafetyTaskTmpl(ctx *context.Context) { |
|
|
|
|
|
|
|
func GetAiSafetyTask(ctx *context.Context) { |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
job, err := models.GetCloudbrainByJobIDWithDeleted(ID) |
|
|
|
job, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainByJobID failed:" + err.Error()) |
|
|
|
return |
|
|
|
} |
|
|
|
syncAiSafetyTaskStatus(job) |
|
|
|
job, err = models.GetCloudbrainByJobIDWithDeleted(ID) |
|
|
|
job, err = models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
job.BenchmarkType = "CV" |
|
|
|
job.BenchmarkTypeName = "Classification" |
|
|
|
ctx.JSON(200, job) |
|
|
|
@@ -96,7 +96,7 @@ func GetAiSafetyTask(ctx *context.Context) { |
|
|
|
|
|
|
|
func StopAiSafetyTask(ctx *context.Context) { |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
task, err := models.GetCloudbrainByJobIDWithDeleted(ID) |
|
|
|
task, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
result := make(map[string]interface{}) |
|
|
|
result["code"] = -1 |
|
|
|
if err != nil { |
|
|
|
@@ -159,7 +159,7 @@ func StopAiSafetyTask(ctx *context.Context) { |
|
|
|
|
|
|
|
func DelAiSafetyTask(ctx *context.Context) { |
|
|
|
var ID = ctx.Params(":jobid") |
|
|
|
task, err := models.GetCloudbrainByJobIDWithDeleted(ID) |
|
|
|
task, err := models.GetCloudbrainByIDWithDeleted(ID) |
|
|
|
result := make(map[string]interface{}) |
|
|
|
result["code"] = 1 |
|
|
|
if err != nil { |
|
|
|
|