fix
This commit is contained in:
parent
00bbe2b4e9
commit
31eb49efa3
|
@ -32,12 +32,12 @@ func main() {
|
|||
defer server.Stop()
|
||||
|
||||
ctx := svc.NewServiceContext(c)
|
||||
handler.RegisterHandlers(server, ctx)
|
||||
//消费渲染前组装数据队列
|
||||
ctx1 := context.Background()
|
||||
ctx2, cancel := context.WithCancel(ctx1)
|
||||
defer cancel()
|
||||
go ctx.RabbitMq.Consume(ctx2, constants.RABBIT_MQ_ASSEMBLE_RENDER_DATA, &consumer.MqConsumerRenderAssemble{})
|
||||
handler.RegisterHandlers(server, ctx)
|
||||
fmt.Printf("Starting server at %s:%d...\n", c.Host, c.Port)
|
||||
server.Start()
|
||||
}
|
||||
|
|
|
@ -22,11 +22,6 @@ type renderImageControlChanItem struct {
|
|||
}
|
||||
|
||||
// 渲染发送到组装数据组装数据
|
||||
type assembleRenderData struct {
|
||||
TaskId string `json:"task_id"`
|
||||
RenderData interface{} `json:"render_data"`
|
||||
}
|
||||
|
||||
func (w *wsConnectItem) assembleRenderData(data []byte) {
|
||||
var renderImageData websocket_data.RenderImageReqMsg
|
||||
if err := json.Unmarshal(data, &renderImageData); err != nil {
|
||||
|
@ -42,7 +37,7 @@ func (w *wsConnectItem) assembleRenderData(data []byte) {
|
|||
TaskId: taskId,
|
||||
RenderId: renderImageData.RenderId,
|
||||
}
|
||||
tmpData := assembleRenderData{
|
||||
tmpData := websocket_data.AssembleRenderData{
|
||||
TaskId: taskId,
|
||||
RenderData: renderImageData.RenderData,
|
||||
}
|
||||
|
|
|
@ -19,3 +19,9 @@ type ThirdPartyLoginRspMsg struct {
|
|||
//websocket三方登录的通知数据
|
||||
Token string `json:"token"`
|
||||
}
|
||||
|
||||
// 发送到渲染组装的mq数据
|
||||
type AssembleRenderData struct {
|
||||
TaskId string `json:"task_id"`
|
||||
RenderData interface{} `json:"render_data"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user