diff --git a/api/desc/ai/pcm-ai.api b/api/desc/ai/pcm-ai.api index d41f7f4a..da96190a 100644 --- a/api/desc/ai/pcm-ai.api +++ b/api/desc/ai/pcm-ai.api @@ -341,7 +341,7 @@ type ImportTasks { TotalFileCount uint32 `json:"totalFileCount,omitempty"` CreateTime uint32 `json:"createTime,omitempty"` ElapsedTime uint32 `json:"elapsedTime,omitempty"` - AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"` + AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"` } /******************taskList end*************************/ /******************ListTrainingJobs start*************************/ diff --git a/api/internal/logic/core/scheduletaskbyyamllogic.go b/api/internal/logic/core/scheduletaskbyyamllogic.go index f1350c7b..763cd798 100644 --- a/api/internal/logic/core/scheduletaskbyyamllogic.go +++ b/api/internal/logic/core/scheduletaskbyyamllogic.go @@ -50,14 +50,13 @@ func (l *ScheduleTaskByYamlLogic) ScheduleTaskByYaml(req *types.ScheduleTaskByYa // 遍历子任务放入任务队列中 for _, task := range req.Tasks { task.TaskId = taskModel.Id - //taskBytes, err := json.Marshal(task) - //if err != nil { - // return err - //} - //l.svcCtx.RedisClient.Publish(context.Background(), "test", &mqs.Msg{ - // Topic: task.TaskType, - // Body: taskBytes, - //}) + // 将任务数据转换成消息体 + reqMessage, err := json.Marshal(task) + if err != nil { + logx.Error(err) + return err + } + l.svcCtx.RedisClient.Publish(context.Background(), task.TaskType, reqMessage) } return nil }