Browse Source

fix-bug

tags/V1.22.3.1^2
liuzx 3 years ago
parent
commit
eee22a9bf4
2 changed files with 16 additions and 3 deletions
  1. +9
    -2
      modules/cloudbrain/cloudbrain.go
  2. +7
    -1
      modules/modelarts/modelarts.go

+ 9
- 2
modules/cloudbrain/cloudbrain.go View File

@@ -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


+ 7
- 1
modules/modelarts/modelarts.go View File

@@ -291,7 +291,13 @@ func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, desc
if err != nil {
return err
}
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobResult.ID, displayJobName, models.ActionCreateDebugNPUTask)
task, err := models.GetCloudbrainByName(jobName)
if err != nil {
log.Error("GetCloudbrainByName failed: %v", err.Error())
return err
}
stringId := strconv.FormatInt(task.ID, 10)
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, stringId, displayJobName, models.ActionCreateDebugNPUTask)
return nil
}



Loading…
Cancel
Save