Browse Source

Merge branch 'grampus-notebook' of openi.pcl.ac.cn:OpenI/aiforge into grampus-notebook

pull/3418/head
zhoupzh 2 years ago
parent
commit
322295a91b
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"
@@ -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
}


Loading…
Cancel
Save