From 4efdd342d6b2344b42b97676804c949abd2fe5de Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 6 Jun 2022 19:20:12 +0800 Subject: [PATCH] singal offline push --- pkg/common/db/newRedisModel.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkg/common/db/newRedisModel.go b/pkg/common/db/newRedisModel.go index 14a137009..f8808e4fd 100644 --- a/pkg/common/db/newRedisModel.go +++ b/pkg/common/db/newRedisModel.go @@ -157,8 +157,13 @@ func (d *DataBases) GetAvailableSignalInvitationInfo(userID string) (invitationI keyList := SignalListCache + userID result := d.rdb.RPop(context.Background(), keyList) if err = result.Err(); err != nil { - return nil, err + return nil, utils.Wrap(err, "GetAvailableSignalInvitationInfo failed") } - invitationInfo, err = d.GetSignalInfoFromCacheByClientMsgID(result.String()) - return invitationInfo, err + key, err := result.Result() + if err != nil { + return nil, utils.Wrap(err, "GetAvailableSignalInvitationInfo failed") + } + log2.NewDebug("", utils.GetSelfFuncName(), result, result.String()) + invitationInfo, err = d.GetSignalInfoFromCacheByClientMsgID(key) + return invitationInfo, utils.Wrap(err, "GetSignalInfoFromCacheByClientMsgID") }