Commit 0e434326 authored by hujiebin's avatar hujiebin

继续减少日志

parent 78f77d43
...@@ -9,7 +9,6 @@ import ( ...@@ -9,7 +9,6 @@ import (
"net/url" "net/url"
"os" "os"
"strconv" "strconv"
"strings"
"time" "time"
"github.com/go-redis/redis/v8" "github.com/go-redis/redis/v8"
...@@ -216,10 +215,10 @@ func (s *server) Broadcast(ctx context.Context, in *userCenter.BroadcastMessage) ...@@ -216,10 +215,10 @@ func (s *server) Broadcast(ctx context.Context, in *userCenter.BroadcastMessage)
} }
for addr, users := range m { for addr, users := range m {
//addr = strings.Replace(addr, "47.91.121.73", "172.26.95.24", -1) //addr = strings.Replace(addr, "47.91.121.73", "172.26.95.24", -1)
mylogrus.MyLog.Infof("Broadcasting: Addr %s: %d users", addr, len(users)) //mylogrus.MyLog.Infof("Broadcasting: Addr %s: %d users", addr, len(users))
if !strings.Contains(addr, "172.26.95.48:50050") && !strings.Contains(addr, "172.26.95.24:50050") { //if !strings.Contains(addr, "172.26.95.48:50050") && !strings.Contains(addr, "172.26.95.24:50050") {
mylogrus.MyLog.Errorf("Broadcasting: Addr error %s: %d users", addr, len(users)) // mylogrus.MyLog.Errorf("Broadcasting: Addr error %s: %d users", addr, len(users))
} //}
const sendBatchSize = 5 const sendBatchSize = 5
for i := 0; i < len(users); i += sendBatchSize { for i := 0; i < len(users); i += sendBatchSize {
...@@ -296,7 +295,7 @@ func (s *server) GetLastRoomHeartbeat(ctx context.Context, in *userCenter.GetLas ...@@ -296,7 +295,7 @@ func (s *server) GetLastRoomHeartbeat(ctx context.Context, in *userCenter.GetLas
} }
func realBroadcast(addr string, uids []uint64, msg *userCenter.BroadcastMessage) { func realBroadcast(addr string, uids []uint64, msg *userCenter.BroadcastMessage) {
mylogrus.MyLog.Infof("Broadcasting: Addr %s: users: %v", addr, uids) //mylogrus.MyLog.Infof("Broadcasting: Addr %s: users: %v", addr, uids)
for _, uid := range uids { for _, uid := range uids {
client := manager.UserProxyMgr.MakeClient(addr) client := manager.UserProxyMgr.MakeClient(addr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment