Merge branch 'master' of https://gitlink.org.cn/JointCloud/pcm-coordinator
Former-commit-id: b591317824db95e591030089d395653479b83c28
This commit is contained in:
commit
9c3255a446
|
@ -404,7 +404,8 @@ type (
|
|||
TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
|
||||
CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||
UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"`
|
||||
AdapterTypeDict int `json:"adapterTypeDict" db:"create_time" gorm:"adapter_type_dict"` //任务类型(对应字典表的值
|
||||
AdapterTypeDict int `json:"adapterTypeDict" db:"adapter_type_dict" gorm:"adapter_type_dict"` //适配器类型(对应字典表的值
|
||||
TaskTypeDict int `json:"taskTypeDict" db:"task_type_dict" gorm:"task_type_dict"` //任务类型(对应字典表的值
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -347,7 +347,8 @@ type TaskModel struct {
|
|||
TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
|
||||
CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
|
||||
UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"`
|
||||
AdapterTypeDict int `json:"adapterTypeDict" db:"create_time" gorm:"adapter_type_dict"` //任务类型(对应字典表的值
|
||||
AdapterTypeDict int `json:"adapterTypeDict" db:"adapter_type_dict" gorm:"adapter_type_dict"` //适配器类型(对应字典表的值
|
||||
TaskTypeDict int `json:"taskTypeDict" db:"task_type_dict" gorm:"task_type_dict"` //任务类型(对应字典表的值
|
||||
}
|
||||
|
||||
type TaskDetailReq struct {
|
||||
|
|
Loading…
Reference in New Issue