fix
This commit is contained in:
parent
d2fbc5c29e
commit
d59131af4b
|
@ -6,6 +6,7 @@ import (
|
|||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/file"
|
||||
"fusenapi/utils/websocket_data"
|
||||
"time"
|
||||
|
||||
"context"
|
||||
|
||||
|
@ -89,14 +90,20 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
|||
RenderId: renderId,
|
||||
Image: uploadRes.ResourceUrl,
|
||||
})
|
||||
//删除对应的需要渲染的图片map
|
||||
ws.renderProperty.renderImageTaskCtlChan <- renderImageControlChanItem{
|
||||
deleteTask := renderImageControlChanItem{
|
||||
Option: 0, //0删除 1添加
|
||||
TaskId: req.TaskId,
|
||||
RenderId: renderId,
|
||||
}
|
||||
select {
|
||||
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
|
||||
})
|
||||
logx.Info("渲染回调成功######################")
|
||||
|
|
Loading…
Reference in New Issue
Block a user