From 3f0d8d017ef799f12905c4d42a090fc2e0582839 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 10 Oct 2023 14:15:43 +0800 Subject: [PATCH 1/2] fix --- server/websocket/internal/logic/rendernotifylogic.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/websocket/internal/logic/rendernotifylogic.go b/server/websocket/internal/logic/rendernotifylogic.go index 4ad6d9b0..c671d6b4 100644 --- a/server/websocket/internal/logic/rendernotifylogic.go +++ b/server/websocket/internal/logic/rendernotifylogic.go @@ -92,7 +92,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a ws, ok := value.(wsConnectItem) if !ok { logx.Error("渲染回调断言websocket连接失败") - return resp.SetStatusWithMessage(basic.CodeFileUploadErr, "渲染回调断言websocket连接失败") + return resp.SetStatusWithMessage(basic.CodeServiceErr, "渲染回调断言websocket连接失败") } //发送到出口 ws.sendRenderResultData(websocket_data.RenderImageRspMsg{ @@ -106,6 +106,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a logx.Info("渲染回调成功,渲染结果图片为:", uploadRes.ResourceUrl) return resp.SetStatusWithMessage(basic.CodeOK, "success") } + logx.Info("渲染成功但找不到ws连接") return resp.SetStatusWithMessage(basic.CodeOK, "success:but websocket connect not found") } //渲染失败走下面 @@ -114,10 +115,13 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a ws, ok := value.(wsConnectItem) if !ok { logx.Error("渲染回调断言websocket连接失败") - return resp.SetStatusWithMessage(basic.CodeFileUploadErr, "渲染回调断言websocket连接失败") + return resp.SetStatusWithMessage(basic.CodeServiceErr, "渲染回调断言websocket连接失败") } //发送错误信息给前端 ws.renderErrResponse(renderId, info.TemplateTag, info.TaskId, "unity云渲染错误:"+req.Msg, 0, 0, 0, 0, 0, 0, 0) + logx.Info("渲染失败且发送了失败信息") + } else { + logx.Info("渲染失败且找不到ws连接") } return resp.SetStatusWithMessage(basic.CodeOK, "success") } From 2068825ae128685a41b4a3c0913a068c42ac40b3 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Tue, 10 Oct 2023 14:19:11 +0800 Subject: [PATCH 2/2] fix --- service/repositories/image_handle.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/repositories/image_handle.go b/service/repositories/image_handle.go index 9c8c647e..ebda071e 100644 --- a/service/repositories/image_handle.go +++ b/service/repositories/image_handle.go @@ -324,7 +324,7 @@ func (l *defaultImageHandle) LogoCombine(ctx context.Context, in *LogoCombineReq RequireTimeout: time.Second * 15, }).PostJson(postMap, &resultBLM) - logc.Infof(ctx, "合图--算法请求--合图--结束时间:%v", time.Now().UTC()) + //logc.Infof(ctx, "合图--算法请求--合图--结束时间:%v", time.Now().UTC()) endTimeLogoCombine := time.Now().UnixMilli() //合图--处理--开始时间 diffTimeLogoCombine := endTimeLogoCombine - startTimeLogoCombine //合图--处理--中间差 logc.Infof(ctx, "合图--算法请求--合图--业务耗时:%d", diffTimeLogoCombine)