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] 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") }