This commit is contained in:
laodaming 2023-08-10 19:12:07 +08:00
parent 34a055aa05
commit d101d241f4
2 changed files with 11 additions and 0 deletions

View File

@ -33,6 +33,11 @@ type MqConsumerRenderAssemble struct {
}
func (m *MqConsumerRenderAssemble) Run(ctx context.Context, data []byte) error {
defer func() {
if err := recover(); err != nil {
logx.Error("MqConsumerRenderAssemble panic:", err)
}
}()
logx.Info("收到需要组装的消息:", string(data))
var parseInfo websocket_data.AssembleRenderData
if err := json.Unmarshal(data, &parseInfo); err != nil {
@ -244,6 +249,7 @@ func getCombineImage(ctx context.Context, svcCtx *svc.ServiceContext, parseInfo
logx.Error("failed to parse python api rsp:", err)
return "", err
}
//fmt.Println("××××××××××××××××××××", pythonApiInfo)
//上传刀版图
var upload = file.Upload{
Ctx: ctx,

View File

@ -13,6 +13,11 @@ type MqConsumerRenderResult struct {
}
func (m *MqConsumerRenderResult) Run(ctx context.Context, data []byte) error {
defer func() {
if err := recover(); err != nil {
logx.Error("MqConsumerRenderResult panic:", err)
}
}()
logx.Info("接收到MqConsumerRenderResult数据:", string(data))
var parseInfo websocket_data.RenderImageNotify
if err := json.Unmarshal(data, &parseInfo); err != nil {