fix
This commit is contained in:
@@ -241,8 +241,8 @@ func (w *wsConnectItem) sendToOutChan(data []byte) {
|
||||
}
|
||||
|
||||
// 获取需要渲染图片的map key
|
||||
func (w *wsConnectItem) getRenderImageMapKey(productId, templateTagId int64) string {
|
||||
return fmt.Sprintf("%d-%d", productId, templateTagId)
|
||||
func (w *wsConnectItem) getRenderImageMapKey(productId, templateTagId int64, algorithmVersion string) string {
|
||||
return fmt.Sprintf("%d-%d-%s", productId, templateTagId, algorithmVersion)
|
||||
}
|
||||
|
||||
// 处理接受到的数据
|
||||
|
||||
@@ -50,7 +50,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq) (resp *basi
|
||||
h.Write([]byte(fmt.Sprintf(constants.RENDER_NOTIFY_SIGN_KEY, string(notifyByte), req.Time)))
|
||||
signHex := h.Sum(nil)
|
||||
sign := hex.EncodeToString(signHex)
|
||||
fmt.Println(sign)
|
||||
//fmt.Println(sign)
|
||||
if req.Sign != sign {
|
||||
return resp.SetStatusWithMessage(basic.CodeRequestParamsErr, "invalid sign")
|
||||
}
|
||||
@@ -61,7 +61,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq) (resp *basi
|
||||
if !ok {
|
||||
return true
|
||||
}
|
||||
renderKey := ws.getRenderImageMapKey(req.Info.ProductId, req.Info.TemplateTagId)
|
||||
renderKey := ws.getRenderImageMapKey(req.Info.ProductId, req.Info.TemplateTagId, req.Info.AlgorithmVersion)
|
||||
//查询有无该渲染任务
|
||||
_, ok = ws.renderProperty.renderImageTask[renderKey]
|
||||
if !ok {
|
||||
|
||||
@@ -33,7 +33,7 @@ func (w *wsConnectItem) SendToCloudRender(data []byte) {
|
||||
return
|
||||
default:
|
||||
//加入渲染任务
|
||||
key := w.getRenderImageMapKey(productId, renderImageData.TemplateTagId)
|
||||
key := w.getRenderImageMapKey(productId, renderImageData.TemplateTagId, renderImageData.AlgorithmVersion)
|
||||
w.renderProperty.renderImageTaskCtlChan <- renderImageControlChanItem{
|
||||
Option: 1, //0删除 1添加
|
||||
Key: key,
|
||||
|
||||
Reference in New Issue
Block a user