11
This commit is contained in:
parent
ee6f74bfb5
commit
770e410116
|
@ -81,7 +81,7 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
//记录收到unity渲染结果时间以及上传渲染图耗时时间
|
//记录收到unity渲染结果时间以及上传渲染图耗时时间
|
||||||
ws.modifyRenderTaskTimeConsuming(renderImageControlChanItem{
|
ws.modifyRenderTaskProperty(renderImageControlChanItem{
|
||||||
option: 2,
|
option: 2,
|
||||||
taskId: req.TaskId,
|
taskId: req.TaskId,
|
||||||
taskProperty: renderTask{
|
taskProperty: renderTask{
|
||||||
|
|
|
@ -187,7 +187,7 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
||||||
//获取唯一id
|
//获取唯一id
|
||||||
taskId := w.genRenderTaskId(renderImageData, model3dInfo, productTemplate, element)
|
taskId := w.genRenderTaskId(renderImageData, model3dInfo, productTemplate, element)
|
||||||
//记录刀版图合成消耗时间跟上传刀版图时间
|
//记录刀版图合成消耗时间跟上传刀版图时间
|
||||||
w.modifyRenderTaskTimeConsuming(renderImageControlChanItem{
|
w.modifyRenderTaskProperty(renderImageControlChanItem{
|
||||||
option: 2,
|
option: 2,
|
||||||
taskId: taskId,
|
taskId: taskId,
|
||||||
taskProperty: renderTask{
|
taskProperty: renderTask{
|
||||||
|
@ -226,6 +226,11 @@ func (w *wsConnectItem) consumeRenderCache(data []byte) {
|
||||||
option: 1, //0删除 1添加 2修改耗时属性
|
option: 1, //0删除 1添加 2修改耗时属性
|
||||||
taskId: taskId,
|
taskId: taskId,
|
||||||
renderId: renderImageData.RenderId,
|
renderId: renderImageData.RenderId,
|
||||||
|
})
|
||||||
|
//记录刀版图
|
||||||
|
w.modifyRenderTaskProperty(renderImageControlChanItem{
|
||||||
|
option: 2,
|
||||||
|
taskId: taskId,
|
||||||
taskProperty: renderTask{
|
taskProperty: renderTask{
|
||||||
combineImage: combineImage,
|
combineImage: combineImage,
|
||||||
},
|
},
|
||||||
|
@ -358,7 +363,7 @@ func (w *wsConnectItem) assembleRenderData(taskId string, combineImage string, i
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
//记录发送到unity时间
|
//记录发送到unity时间
|
||||||
w.modifyRenderTaskTimeConsuming(renderImageControlChanItem{
|
w.modifyRenderTaskProperty(renderImageControlChanItem{
|
||||||
option: 2,
|
option: 2,
|
||||||
taskId: taskId,
|
taskId: taskId,
|
||||||
taskProperty: renderTask{
|
taskProperty: renderTask{
|
||||||
|
@ -397,8 +402,8 @@ func (w *wsConnectItem) deleteRenderTask(data renderImageControlChanItem) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改耗时属性(只有耗时属性可以更新)
|
// 修改任务属性(只有耗时属性可以更新)
|
||||||
func (w *wsConnectItem) modifyRenderTaskTimeConsuming(data renderImageControlChanItem) {
|
func (w *wsConnectItem) modifyRenderTaskProperty(data renderImageControlChanItem) {
|
||||||
if data.taskId == "" {
|
if data.taskId == "" {
|
||||||
logx.Error("设置耗时属性需要的task_id不能为空")
|
logx.Error("设置耗时属性需要的task_id不能为空")
|
||||||
return
|
return
|
||||||
|
@ -469,7 +474,6 @@ func (w *wsConnectItem) operationRenderTask() {
|
||||||
case 1: //新增任务
|
case 1: //新增任务
|
||||||
w.extendRenderProperty.renderImageTask[data.taskId] = &renderTask{
|
w.extendRenderProperty.renderImageTask[data.taskId] = &renderTask{
|
||||||
renderId: data.renderId,
|
renderId: data.renderId,
|
||||||
combineImage: data.taskProperty.combineImage,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case 2: //修改(耗时)属性
|
case 2: //修改(耗时)属性
|
||||||
|
@ -494,6 +498,9 @@ func (w *wsConnectItem) operationRenderTask() {
|
||||||
if data.taskProperty.unityRenderEndTime != 0 {
|
if data.taskProperty.unityRenderEndTime != 0 {
|
||||||
taskData.unityRenderEndTime = data.taskProperty.unityRenderEndTime
|
taskData.unityRenderEndTime = data.taskProperty.unityRenderEndTime
|
||||||
}
|
}
|
||||||
|
if data.taskProperty.combineImage != "" {
|
||||||
|
taskData.combineImage = data.taskProperty.combineImage
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user