Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
1b7c58ad
Commit
1b7c58ad
authored
May 11, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排查问题需要: 下线暂不清redis
parent
4843faef
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
core/src/main/java/com/wecloud/im/ws/utils/RedisUtils.java
+1
-1
core/src/main/java/com/wecloud/rtc/service/impl/MangerRtcCacheServiceImpl.java
+4
-4
No files found.
core/src/main/java/com/wecloud/im/ws/utils/RedisUtils.java
View file @
1b7c58ad
...
@@ -205,7 +205,7 @@ public class RedisUtils {
...
@@ -205,7 +205,7 @@ public class RedisUtils {
* @param key
* @param key
*/
*/
public
void
removeForSet
(
String
key
,
String
value
)
{
public
void
removeForSet
(
String
key
,
String
value
)
{
redisTemplate
.
opsForSet
().
remove
(
key
,
value
);
//
redisTemplate.opsForSet().remove(key, value);
}
}
/**
/**
...
...
core/src/main/java/com/wecloud/rtc/service/impl/MangerRtcCacheServiceImpl.java
View file @
1b7c58ad
...
@@ -69,11 +69,11 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
...
@@ -69,11 +69,11 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
String
channelKey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_INFO
,
rtcChannelId
);
String
channelKey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_INFO
,
rtcChannelId
);
redisUtils
.
addKey
(
channelKey
,
rtcChannelInfoJson
,
Duration
.
ofDays
(
10
));
redisUtils
.
addKey
(
channelKey
,
rtcChannelInfoJson
,
Duration
.
ofDays
(
10
));
//用户当前在线的频道ID
//
用户当前在线的频道ID
String
userJoinChannelKey
=
String
.
format
(
RtcRedisKey
.
USER_JOIN_CHANNEL
,
clientId
);
String
userJoinChannelKey
=
String
.
format
(
RtcRedisKey
.
USER_JOIN_CHANNEL
,
clientId
);
redisUtils
.
addKey
(
userJoinChannelKey
,
rtcChannelId
.
toString
(),
Duration
.
ofDays
(
10
));
redisUtils
.
addKey
(
userJoinChannelKey
,
rtcChannelId
.
toString
(),
Duration
.
ofDays
(
10
));
//频道中存在的用户
//
频道中存在的用户
String
rtcChannelUsers
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
String
rtcChannelUsers
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
clientId
+
""
,
10
,
TimeUnit
.
DAYS
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
clientId
+
""
,
10
,
TimeUnit
.
DAYS
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
toClientId
+
""
,
10
,
TimeUnit
.
DAYS
);
redisUtils
.
addForSet
(
rtcChannelUsers
,
toClientId
+
""
,
10
,
TimeUnit
.
DAYS
);
...
@@ -97,8 +97,8 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
...
@@ -97,8 +97,8 @@ public class MangerRtcCacheServiceImpl implements MangerRtcCacheService {
redisUtils
.
delKey
(
userJoinChannelKey
);
redisUtils
.
delKey
(
userJoinChannelKey
);
//频道中存在的用户
//频道中存在的用户
String
rtcChannelUsers
k
ey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
String
rtcChannelUsers
K
ey
=
String
.
format
(
RtcRedisKey
.
RTC_CHANNEL_USERS
,
rtcChannelId
);
redisUtils
.
removeForSet
(
rtcChannelUsers
k
ey
,
clientId
+
""
);
redisUtils
.
removeForSet
(
rtcChannelUsers
K
ey
,
clientId
+
""
);
}
}
@Override
@Override
...
...
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