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