|
|
@ -11,6 +11,7 @@ import (
|
|
|
|
"live-service/app/user_center/model"
|
|
|
|
"live-service/app/user_center/model"
|
|
|
|
"live-service/app/user_center/rpc/internal/svc"
|
|
|
|
"live-service/app/user_center/rpc/internal/svc"
|
|
|
|
"live-service/app/user_center/rpc/pb"
|
|
|
|
"live-service/app/user_center/rpc/pb"
|
|
|
|
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var Service *Job
|
|
|
|
var Service *Job
|
|
|
@ -300,6 +301,8 @@ func (j *Job) persistence(rankType int32) {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if len(dbModel) > 0 {
|
|
|
|
if len(dbModel) > 0 {
|
|
|
|
|
|
|
|
// 简单避免死锁
|
|
|
|
|
|
|
|
time.Sleep(1 * time.Second)
|
|
|
|
if err = j.svcCtx.RankPvpModel.UpdateRank(j.ctx, rankType, dbModel); err != nil {
|
|
|
|
if err = j.svcCtx.RankPvpModel.UpdateRank(j.ctx, rankType, dbModel); err != nil {
|
|
|
|
logx.Error("更新排行榜错误", err)
|
|
|
|
logx.Error("更新排行榜错误", err)
|
|
|
|
return
|
|
|
|
return
|
|
|
|