Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-user
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenweijian
hilo-user
Compare Revisions
feature/redis-queue...master
Source
master
Select Git revision
...
Target
feature/redis-queue
Select Git revision
Compare
Commits (5)
rediscluster queue
· b3a2b451
hujiebin
authored
Sep 01, 2023
b3a2b451
Merge branch 'feature/redis-queue' into 'master'
· 484f4349
hujiebin
authored
Sep 01, 2023
rediscluster queue See merge request
!34
484f4349
Feature/group room living
· e3fb3ad7
hujiebin
authored
Sep 03, 2023
e3fb3ad7
Merge branch 'feature/group_room_living' into 'master'
· 8c36debc
hujiebin
authored
Sep 03, 2023
Feature/group room living See merge request
!35
8c36debc
feat:SyncGroupRoomLiving功成身退
· 12397b2d
iamhujiebin
authored
Sep 03, 2023
12397b2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
gift_event.go
domain/cache/gift_c/gift_event.go
+1
-1
room.go
domain/model/group_m/room.go
+2
-4
No files found.
domain/cache/gift_c/gift_event.go
View file @
12397b2d
...
...
@@ -14,7 +14,7 @@ const EventSendGiftHiloUserQueue = "send:gift:queue:hilo_user"
func
BLPopQueueSendGift
(
model
*
domain
.
Model
)
*
gift_ev
.
SendGiftEvent
{
var
res
*
gift_ev
.
SendGiftEvent
queue
:=
EventSendGiftHiloUserQueue
strs
,
err
:=
model
.
Redis
.
BLPop
(
model
,
time
.
Second
,
queue
)
.
Result
()
strs
,
err
:=
model
.
Redis
Cluster
.
BLPop
(
model
,
time
.
Second
,
queue
)
.
Result
()
if
err
!=
nil
{
if
err
!=
redis
.
Nil
{
model
.
Log
.
Errorf
(
"BLPopQueueSendGift fail:%v"
,
err
)
...
...
domain/model/group_m/room.go
View file @
12397b2d
...
...
@@ -4,7 +4,6 @@ import (
"git.hilo.cn/hilo-common/domain"
"git.hilo.cn/hilo-common/mylogrus"
"git.hilo.cn/hilo-common/resource/mysql"
"git.hilo.cn/hilo-common/resource/redisCli"
"hilo-user/_const/redis_key/group_k"
"hilo-user/myerr"
"strconv"
...
...
@@ -26,7 +25,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
return
nil
,
myerr
.
WrapErr
(
err
)
}
groupUserIdstrs
,
err
:=
redisCli
.
GetRedis
()
.
ZRange
(
model
,
key
,
0
,
-
1
)
.
Result
()
groupUserIdstrs
,
err
:=
model
.
RedisCluster
.
ZRange
(
model
,
key
,
0
,
-
1
)
.
Result
()
if
err
!=
nil
{
return
nil
,
myerr
.
WrapErr
(
err
)
}
...
...
@@ -34,7 +33,6 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
resultUserSet
:=
map
[
mysql
.
ID
]
string
{}
for
i
,
_
:=
range
groupUserIdstrs
{
tempGroupUid
,
userId
:=
analysisMemberStr
(
groupUserIdstrs
[
i
])
mylogrus
.
MyLog
.
Debugf
(
"RoomLivingUserIdFilter, analysisMemberStr %s, %d"
,
tempGroupUid
,
userId
)
if
_
,
flag
:=
userIdSet
[
userId
];
flag
{
resultUserSet
[
userId
]
=
tempGroupUid
...
...
@@ -44,7 +42,7 @@ func RoomLivingUserIdFilter(model *domain.Model, userIds []mysql.ID) (map[mysql.
}
func
ClearExpired
(
model
*
domain
.
Model
,
key
string
,
expireSec
int64
)
error
{
return
model
.
Redis
.
ZRemRangeByScore
(
model
,
key
,
return
model
.
Redis
Cluster
.
ZRemRangeByScore
(
model
,
key
,
"0"
,
strconv
.
FormatInt
(
time
.
Now
()
.
Unix
()
-
expireSec
,
10
))
.
Err
()
}
...
...