Browse Source

fix-bug

tags/V1.22.3.1^2
liuzx 4 years ago
parent
commit
58b4256c05
2 changed files with 5 additions and 5 deletions
  1. +4
    -4
      modules/modelarts/modelarts.go
  2. +1
    -1
      modules/util/util.go

+ 4
- 4
modules/modelarts/modelarts.go View File

@@ -291,7 +291,7 @@ func GenerateNotebook2(ctx *context.Context, displayJobName, jobName, uuid, desc
if err != nil {
return err
}
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobResult.ID, jobName, models.ActionCreateDebugNPUTask)
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobResult.ID, displayJobName, models.ActionCreateDebugNPUTask)
return nil
}

@@ -359,10 +359,10 @@ func GenerateTrainJob(ctx *context.Context, req *GenerateTrainJobReq) (err error
})

if err != nil {
log.Error("CreateCloudbrain(%s) failed:%v", req.JobName, err.Error())
log.Error("CreateCloudbrain(%s) failed:%v", req.DisplayJobName, err.Error())
return err
}
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobId, req.JobName, models.ActionCreateTrainTask)
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobId, req.DisplayJobName, models.ActionCreateTrainTask)
return nil
}

@@ -589,7 +589,7 @@ func GenerateInferenceJob(ctx *context.Context, req *GenerateInferenceJobReq) (e
log.Error("CreateCloudbrain(%s) failed:%v", req.JobName, err.Error())
return err
}
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, req.JobName, models.ActionCreateInferenceTask)
notification.NotifyOtherTask(ctx.User, ctx.Repo.Repository, jobID, req.DisplayJobName, models.ActionCreateInferenceTask)
return nil
}



+ 1
- 1
modules/util/util.go View File

@@ -115,7 +115,7 @@ func AddZero(t int64) (m string) {

func ConvertDisplayJobNameToJobName(DisplayName string) (JobName string) {
t := time.Now()
JobName = "name" + strings.ToLower(cutNameString(DisplayName, 15)) + "t" + t.Format("2006010215") + strconv.Itoa(int(rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(100000)))
JobName = "openi" + strings.ToLower(cutNameString(DisplayName, 15)) + "t" + t.Format("2006010215") + strconv.Itoa(int(rand.New(rand.NewSource(time.Now().UnixNano())).Int31n(100000)))
return JobName
}



Loading…
Cancel
Save