Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
ws-rst
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qlintonger xeno
ws-rst
Commits
d44e7632
Commit
d44e7632
authored
Feb 25, 2025
by
qlintonger xeno
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
阐释添加额外消息发送+2.567
parent
0630816f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/handles/redis.rs
+6
-6
No files found.
src/handles/redis.rs
View file @
d44e7632
...
...
@@ -81,6 +81,12 @@ pub async fn insert_this_connection(
"idle"
,
""
,
device_id
,
from_id
,
has_camera
,
has_mike
,
user_call_group
,
from_name_decoded
);
{
// 获取写锁以进行写操作
ONLINE_USERS
.insert
(
from_id
.to_string
(),
user_info_str
);
println!
(
"成功将用户id: {} 的信息插入到 ONLINE_USERS 中"
,
from_id
);
}
let
mut
con
=
REDIS_POOL
.get_connection
()
.expect
(
"Failed to get Redis connection"
);
...
...
@@ -92,11 +98,5 @@ pub async fn insert_this_connection(
);
return
Err
(
e
);
}
{
// 获取写锁以进行写操作
ONLINE_USERS
.insert
(
from_id
.to_string
(),
user_info_str
);
println!
(
"成功将用户id: {} 的信息插入到 ONLINE_USERS 中"
,
from_id
);
}
Ok
(())
}
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