Merge pull request 'fix noticeinfo bugs' (#235) from tzwang/pcm-coordinator:master into master
Former-commit-id: 5f1f61275d53b4463951a0e0dcca2a497548bc79
This commit is contained in:
commit
ae657125d1
|
@ -333,9 +333,9 @@ func infer(opt *option.InferOption, clusters []*strategy.AssignedCluster, ts []s
|
|||
}
|
||||
|
||||
if len(cs) == successStatusCount {
|
||||
svcCtx.Scheduler.AiStorages.AddNoticeInfo(opt.AdapterId, adapterName, "", "", opt.TaskName, "failed", "任务失败")
|
||||
} else {
|
||||
svcCtx.Scheduler.AiStorages.AddNoticeInfo(opt.AdapterId, adapterName, "", "", opt.TaskName, "completed", "任务完成")
|
||||
} else {
|
||||
svcCtx.Scheduler.AiStorages.AddNoticeInfo(opt.AdapterId, adapterName, "", "", opt.TaskName, "failed", "任务失败")
|
||||
}
|
||||
|
||||
//save ai sub tasks
|
||||
|
|
|
@ -311,12 +311,16 @@ func (s *AiStorage) GetStrategyCode(name string) (int64, error) {
|
|||
func (s *AiStorage) AddNoticeInfo(adapterId string, adapterName string, clusterId string, clusterName string, taskName string, noticeType string, incident string) {
|
||||
aId, err := strconv.ParseInt(adapterId, 10, 64)
|
||||
if err != nil {
|
||||
return
|
||||
logx.Errorf("adapterId convert failure, err: %v", err)
|
||||
}
|
||||
cId, err := strconv.ParseInt(clusterId, 10, 64)
|
||||
if err != nil {
|
||||
return
|
||||
var cId int64
|
||||
if clusterId != "" {
|
||||
cId, err = strconv.ParseInt(clusterId, 10, 64)
|
||||
if err != nil {
|
||||
logx.Errorf("clusterId convert failure, err: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
noticeInfo := clientCore.NoticeInfo{
|
||||
AdapterId: aId,
|
||||
AdapterName: adapterName,
|
||||
|
|
Loading…
Reference in New Issue