|
|
|
@@ -262,10 +262,17 @@ func GenerateTask(ctx *context.Context, displayJobName, jobName, image, command, |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
task, err := models.GetCloudbrainByName(jobName) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainByName failed: %v", err.Error()) |
|
|
|
return err |
|
|
|
} |
|
|
|
stringId := strconv.FormatInt(task.ID, 10) |
|
|
|
|
|
|
|
if string(models.JobTypeBenchmark) == jobType { |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, displayJobName, models.ActionCreateBenchMarkTask) |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateBenchMarkTask) |
|
|
|
} else { |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, displayJobName, models.ActionCreateDebugGPUTask) |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateDebugGPUTask) |
|
|
|
} |
|
|
|
|
|
|
|
return nil |
|
|
|
|