fix
This commit is contained in:
parent
e25cc97ea0
commit
7dc9760d94
|
@ -4,7 +4,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fusenapi/server/websocket/internal/types"
|
"fusenapi/server/websocket/internal/types"
|
||||||
"github.com/zeromicro/go-zero/core/logx"
|
"github.com/zeromicro/go-zero/core/logx"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// 渲染请求数据处理发送云渲染服务处理
|
// 渲染请求数据处理发送云渲染服务处理
|
||||||
|
@ -15,14 +14,11 @@ func (w *wsConnectItem) SendToCloudRender(data []byte) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
logx.Info("收到请求云渲染图片数据:", renderImageData)
|
logx.Info("收到请求云渲染图片数据:", renderImageData)
|
||||||
timer := time.NewTimer(time.Second * 10)
|
|
||||||
//把需要渲染的图片任务加进去
|
//把需要渲染的图片任务加进去
|
||||||
for _, v := range renderImageData {
|
for _, v := range renderImageData {
|
||||||
select {
|
select {
|
||||||
case <-w.closeChan: //连接关闭了
|
case <-w.closeChan: //连接关闭了
|
||||||
return
|
return
|
||||||
case <-timer.C: //10秒超时了
|
|
||||||
return
|
|
||||||
default:
|
default:
|
||||||
//加入渲染任务
|
//加入渲染任务
|
||||||
key := w.getRenderImageMapKey(v.ProductId, v.SizeId, v.TemplateId)
|
key := w.getRenderImageMapKey(v.ProductId, v.SizeId, v.TemplateId)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user