Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hilo-group
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
hujiebin
hilo-group
Commits
439687d9
Commit
439687d9
authored
Aug 28, 2023
by
hujiebin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
online_status迁移到redis-cluster
parent
cb4a4fad
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
user.go
domain/model/tim_m/user.go
+2
-2
No files found.
domain/model/tim_m/user.go
View file @
439687d9
...
@@ -387,10 +387,10 @@ func getOnlineStatus(extIds []string) ([]interface{}, error) {
...
@@ -387,10 +387,10 @@ func getOnlineStatus(extIds []string) ([]interface{}, error) {
for
_
,
e
:=
range
extIds
{
for
_
,
e
:=
range
extIds
{
keys
=
append
(
keys
,
redis_key
.
GetOnLineStatusKey
(
e
))
keys
=
append
(
keys
,
redis_key
.
GetOnLineStatusKey
(
e
))
}
}
return
redisCli
.
RedisClient
.
MGet
(
context
.
Background
(),
keys
...
)
.
Result
()
return
redisCli
.
RedisCl
usterCl
ient
.
MGet
(
context
.
Background
(),
keys
...
)
.
Result
()
}
}
func
setOnlineStatus
(
extId
string
,
status
uint
,
ttl
time
.
Duration
)
error
{
func
setOnlineStatus
(
extId
string
,
status
uint
,
ttl
time
.
Duration
)
error
{
key
:=
redis_key
.
GetOnLineStatusKey
(
extId
)
key
:=
redis_key
.
GetOnLineStatusKey
(
extId
)
return
redisCli
.
RedisClient
.
Set
(
context
.
Background
(),
key
,
status
,
ttl
)
.
Err
()
return
redisCli
.
RedisCl
usterCl
ient
.
Set
(
context
.
Background
(),
key
,
status
,
ttl
)
.
Err
()
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment