redis队列替换kafka
Former-commit-id: 744a11a0d88e451f77fd3ea525f219e968bba701
This commit is contained in:
parent
f66c9b8b7b
commit
bdb1ad3d59
|
@ -341,7 +341,7 @@ type ImportTasks {
|
||||||
TotalFileCount uint32 `json:"totalFileCount,omitempty"`
|
TotalFileCount uint32 `json:"totalFileCount,omitempty"`
|
||||||
CreateTime uint32 `json:"createTime,omitempty"`
|
CreateTime uint32 `json:"createTime,omitempty"`
|
||||||
ElapsedTime uint32 `json:"elapsedTime,omitempty"`
|
ElapsedTime uint32 `json:"elapsedTime,omitempty"`
|
||||||
AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"`
|
AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"`
|
||||||
}
|
}
|
||||||
/******************taskList end*************************/
|
/******************taskList end*************************/
|
||||||
/******************ListTrainingJobs start*************************/
|
/******************ListTrainingJobs start*************************/
|
||||||
|
|
|
@ -50,14 +50,13 @@ func (l *ScheduleTaskByYamlLogic) ScheduleTaskByYaml(req *types.ScheduleTaskByYa
|
||||||
// 遍历子任务放入任务队列中
|
// 遍历子任务放入任务队列中
|
||||||
for _, task := range req.Tasks {
|
for _, task := range req.Tasks {
|
||||||
task.TaskId = taskModel.Id
|
task.TaskId = taskModel.Id
|
||||||
//taskBytes, err := json.Marshal(task)
|
// 将任务数据转换成消息体
|
||||||
//if err != nil {
|
reqMessage, err := json.Marshal(task)
|
||||||
// return err
|
if err != nil {
|
||||||
//}
|
logx.Error(err)
|
||||||
//l.svcCtx.RedisClient.Publish(context.Background(), "test", &mqs.Msg{
|
return err
|
||||||
// Topic: task.TaskType,
|
}
|
||||||
// Body: taskBytes,
|
l.svcCtx.RedisClient.Publish(context.Background(), task.TaskType, reqMessage)
|
||||||
//})
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue