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
Compare Revisions
feature/popular-up...master
Source
master
Select Git revision
...
Target
feature/popular-up
Select Git revision
Compare
Commits (1)
feat:同步在mic上的人
· 577a8fef
hujiebin
authored
Sep 06, 2023
577a8fef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
on_mic.go
cron/mic_cron/on_mic.go
+8
-0
No files found.
cron/mic_cron/on_mic.go
View file @
577a8fef
package
mic_cron
import
(
"fmt"
"git.hilo.cn/hilo-common/domain"
"github.com/robfig/cron"
"hilo-group/_const/redis_key/mic_k"
"hilo-group/domain/cache/mic_c"
"hilo-group/domain/event/mic_ev"
"hilo-group/domain/model/group_m"
...
...
@@ -24,6 +26,7 @@ func OnMicCheck() {
return
}
for
_
,
groupId
:=
range
groupIds
{
onGroupMicKey
:=
mic_k
.
GetGroupOnMicUser
(
groupId
)
// 同步在mic上的人
//遍历每个麦位
for
i
:=
1
;
i
<=
group_m
.
MaxMicNum
;
i
++
{
micUser
,
err
:=
group_m
.
GetMicUser
(
model
,
groupId
,
i
)
...
...
@@ -41,6 +44,11 @@ func OnMicCheck() {
});
err
!=
nil
{
model
.
Log
.
Errorf
(
"QueueOnMic fail:%v"
,
err
)
}
// 设置mic上的人
model
.
Redis
.
HSet
(
model
,
onGroupMicKey
,
i
,
micUser
.
UserId
)
}
else
{
// 删除mic上的人
model
.
Redis
.
HDel
(
model
,
onGroupMicKey
,
fmt
.
Sprintf
(
"%d"
,
i
))
}
}
}
...
...