Merge branch 'develop' of https://gitee.com/fusenpack/fusenapi into develop

This commit is contained in:
eson 2023-08-29 10:56:41 +08:00
commit 79b6277332
2 changed files with 14 additions and 7 deletions

View File

@ -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{

View File

@ -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
}
}
}
}