|
|
@@ -2,6 +2,7 @@ package grampus |
|
|
|
|
|
|
|
import ( |
|
|
|
"fmt" |
|
|
|
"strconv" |
|
|
|
"strings" |
|
|
|
|
|
|
|
"code.gitea.io/gitea/models" |
|
|
@@ -263,7 +264,14 @@ func GenerateNotebookJob(ctx *context.Context, req *GenerateNotebookJobReq) (job |
|
|
|
} else if req.ComputeResource == models.GPUResource { |
|
|
|
actionType = models.ActionCreateGrampusGPUDebugTask |
|
|
|
} |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, req.DisplayJobName, actionType) |
|
|
|
task, err := models.GetCloudbrainByJobID(jobID) |
|
|
|
if err != nil { |
|
|
|
log.Error("GetCloudbrainByJobID failed: %v", err.Error()) |
|
|
|
return "", err |
|
|
|
} |
|
|
|
|
|
|
|
stringId := strconv.FormatInt(task.ID, 10) |
|
|
|
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, req.DisplayJobName, actionType) |
|
|
|
|
|
|
|
return jobID, nil |
|
|
|
} |
|
|
|