diff --git a/server/render/consumer/assemble_render_data.go b/server/render/consumer/assemble_render_data.go index 3c7f1ffa..98184dca 100644 --- a/server/render/consumer/assemble_render_data.go +++ b/server/render/consumer/assemble_render_data.go @@ -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, diff --git a/server/websocket/internal/logic/mq_consumer.go b/server/websocket/internal/logic/mq_consumer.go index 7488e229..410dee3e 100644 --- a/server/websocket/internal/logic/mq_consumer.go +++ b/server/websocket/internal/logic/mq_consumer.go @@ -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 {