Browse Source

Merge remote-tracking branch 'origin/grampus-notebook' into gcu

gcu
chenyifan01 2 years ago
parent
commit
39007e5a60
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      modules/grampus/grampus.go

+ 9
- 1
modules/grampus/grampus.go View File

@@ -2,6 +2,7 @@ package grampus

import (
"fmt"
"strconv"
"strings"

"code.gitea.io/gitea/models"
@@ -320,7 +321,14 @@ func GenerateNotebookJob(ctx *context.Context, req *GenerateNotebookJobReq) (job
} else if req.ComputeResource == models.GCUResource {
actionType = models.ActionCreateGrampusGCUDebugTask
}
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
}


Loading…
Cancel
Save