fix
This commit is contained in:
parent
d2fbc5c29e
commit
d59131af4b
|
@ -6,6 +6,7 @@ import (
|
||||||
"fusenapi/utils/basic"
|
"fusenapi/utils/basic"
|
||||||
"fusenapi/utils/file"
|
"fusenapi/utils/file"
|
||||||
"fusenapi/utils/websocket_data"
|
"fusenapi/utils/websocket_data"
|
||||||
|
"time"
|
||||||
|
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
@ -89,14 +90,20 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
RenderId: renderId,
|
RenderId: renderId,
|
||||||
Image: uploadRes.ResourceUrl,
|
Image: uploadRes.ResourceUrl,
|
||||||
})
|
})
|
||||||
//删除对应的需要渲染的图片map
|
deleteTask := renderImageControlChanItem{
|
||||||
ws.renderProperty.renderImageTaskCtlChan <- renderImageControlChanItem{
|
|
||||||
Option: 0, //0删除 1添加
|
Option: 0, //0删除 1添加
|
||||||
TaskId: req.TaskId,
|
TaskId: req.TaskId,
|
||||||
RenderId: renderId,
|
RenderId: renderId,
|
||||||
}
|
}
|
||||||
//发送数据到out chan
|
select {
|
||||||
ws.sendToOutChan(b)
|
case <-ws.closeChan: //关闭了
|
||||||
|
return true
|
||||||
|
case ws.renderProperty.renderImageTaskCtlChan <- deleteTask: //删除对应的需要渲染的图片map
|
||||||
|
//发送数据到out chan
|
||||||
|
ws.sendToOutChan(b)
|
||||||
|
case <-time.After(time.Second * 3): //超时丢弃
|
||||||
|
return true
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
logx.Info("渲染回调成功######################")
|
logx.Info("渲染回调成功######################")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user