optimize rueidis nil message process logic

pull/385/head
Michael Li 10 months ago
parent bf4026c5af
commit e953f7727a
No known key found for this signature in database

@ -7,6 +7,7 @@ package web
import ( import (
"github.com/alimy/mir/v4" "github.com/alimy/mir/v4"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"github.com/redis/rueidis"
api "github.com/rocboss/paopao-ce/auto/api/v1" api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/core" "github.com/rocboss/paopao-ce/internal/core"
"github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/model/web"
@ -35,7 +36,7 @@ func (s *relaxSrv) GetUnreadMsgCount(req *web.GetUnreadMsgCountReq) (*web.GetUnr
return &web.GetUnreadMsgCountResp{ return &web.GetUnreadMsgCountResp{
JsonResp: data, JsonResp: data,
}, nil }, nil
} else { } else if !rueidis.IsRedisNil(xerr) {
logrus.Warnf("GetUnreadMsgCount from cache occurs error: %s", xerr) logrus.Warnf("GetUnreadMsgCount from cache occurs error: %s", xerr)
} }
// 使用缓存机制特殊处理 // 使用缓存机制特殊处理

Loading…
Cancel
Save