refactor: 重构 PVP 匹配逻辑使用模型结构体
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -82,7 +82,8 @@ func ListenFunc(ctx g.Ctx) {
|
||||
continue
|
||||
}
|
||||
cool.Logger.Info(ctx, "成功订阅 Redis 主题", "topic", subscribeTopic)
|
||||
_, err = conn.Do(ctx, "subscribe", "sun:join:2458") //加入队列
|
||||
_, err = conn.Do(ctx, "subscribe", "sun:join") //加入队列
|
||||
_, err = conn.Do(ctx, "subscribe", "sun:cancel") //退出队列
|
||||
|
||||
// 4. 循环接收消息
|
||||
connError := false
|
||||
@@ -118,7 +119,7 @@ func ListenFunc(ctx g.Ctx) {
|
||||
cool.Logger.Error(ctx, "执行函数失败", "payload", dataMap.Payload, "error", err)
|
||||
}
|
||||
}
|
||||
if dataMap.Channel == "sun:join:2458" {
|
||||
if dataMap.Channel == "sun:join" {
|
||||
|
||||
fightmap.ADD(dataMap.Payload)
|
||||
//universalClient, _ := g.Redis("cool").Client().(goredis.UniversalClient)
|
||||
|
||||
Reference in New Issue
Block a user