fix
This commit is contained in:
parent
5721bb31c8
commit
3cd976976a
|
@ -50,10 +50,10 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
if info.RenderBeginTime > serverStartTime {
|
if info.RenderBeginTime > serverStartTime {
|
||||||
//logx.Info("任务时间:", info.RenderBeginTime, "服务器启动时间:", serverStartTime)
|
//logx.Info("任务时间:", info.RenderBeginTime, "服务器启动时间:", serverStartTime)
|
||||||
//统计unity处理数
|
//统计unity处理数
|
||||||
decreaseUnityRequestCount(req.UserId, req.GuestId)
|
decreaseUnityRequestCount(info.UserId, info.GuestId)
|
||||||
if req.Code != 0 {
|
if req.Code != 0 {
|
||||||
//统计unity失败处理数
|
//统计unity失败处理数
|
||||||
increaseUnityErrorCount(req.UserId, req.GuestId)
|
increaseUnityErrorCount(info.UserId, info.GuestId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//重新赋值(很重要)
|
//重新赋值(很重要)
|
||||||
|
@ -76,8 +76,8 @@ func (l *RenderNotifyLogic) RenderNotify(req *types.RenderNotifyReq, userinfo *a
|
||||||
Metadata: "",
|
Metadata: "",
|
||||||
UploadBucket: 1,
|
UploadBucket: 1,
|
||||||
ApiType: 2,
|
ApiType: 2,
|
||||||
UserId: req.UserId,
|
UserId: info.UserId,
|
||||||
GuestId: req.GuestId,
|
GuestId: info.GuestId,
|
||||||
FileByte: nil,
|
FileByte: nil,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -400,6 +400,8 @@ func (w *wsConnectItem) assembleRenderDataToUnity(taskId string, resolution int,
|
||||||
RequestId: info.RequestId,
|
RequestId: info.RequestId,
|
||||||
RenderBeginTime: time.Now().UTC().UnixMilli(),
|
RenderBeginTime: time.Now().UTC().UnixMilli(),
|
||||||
TemplateTag: info.RenderData.TemplateTag,
|
TemplateTag: info.RenderData.TemplateTag,
|
||||||
|
UserId: w.userId,
|
||||||
|
GuestId: w.guestId,
|
||||||
}
|
}
|
||||||
temIdBytes, _ := json.Marshal(temId)
|
temIdBytes, _ := json.Marshal(temId)
|
||||||
sendData := map[string]interface{}{
|
sendData := map[string]interface{}{
|
||||||
|
|
|
@ -10,12 +10,10 @@ type DataTransferReq struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type RenderNotifyReq struct {
|
type RenderNotifyReq struct {
|
||||||
TaskId string `json:"task_id"`
|
TaskId string `json:"task_id"`
|
||||||
UserId int64 `json:"user_id"`
|
Image string `json:"image"`
|
||||||
GuestId int64 `json:"guest_id"`
|
Code int `json:"code,optional"`
|
||||||
Image string `json:"image"`
|
Msg string `json:"msg,optional"`
|
||||||
Code int `json:"code,optional"`
|
|
||||||
Msg string `json:"msg,optional"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type CommonNotifyReq struct {
|
type CommonNotifyReq struct {
|
||||||
|
|
|
@ -32,12 +32,10 @@ type DataTransferReq {
|
||||||
}
|
}
|
||||||
//渲染完了通知接口
|
//渲染完了通知接口
|
||||||
type RenderNotifyReq {
|
type RenderNotifyReq {
|
||||||
TaskId string `json:"task_id"`
|
TaskId string `json:"task_id"`
|
||||||
UserId int64 `json:"user_id"`
|
Image string `json:"image"`
|
||||||
GuestId int64 `json:"guest_id"`
|
Code int `json:"code,optional"`
|
||||||
Image string `json:"image"`
|
Msg string `json:"msg,optional"`
|
||||||
Code int `json:"code,optional"`
|
|
||||||
Msg string `json:"msg,optional"`
|
|
||||||
}
|
}
|
||||||
//通用回调接口
|
//通用回调接口
|
||||||
type CommonNotifyReq {
|
type CommonNotifyReq {
|
||||||
|
|
|
@ -68,4 +68,6 @@ type ToUnityIdStruct struct {
|
||||||
RequestId string `json:"request_id"`
|
RequestId string `json:"request_id"`
|
||||||
RenderBeginTime int64 `json:"render_begin_time"`
|
RenderBeginTime int64 `json:"render_begin_time"`
|
||||||
TemplateTag string `json:"template_tag"`
|
TemplateTag string `json:"template_tag"`
|
||||||
|
UserId int64 `json:"user_id"`
|
||||||
|
GuestId int64 `json:"guest_id"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user