diff --git a/internal/api/user/user.go b/internal/api/user/user.go index 51919fa42..48171ece0 100644 --- a/internal/api/user/user.go +++ b/internal/api/user/user.go @@ -417,6 +417,7 @@ func GetUsersOnlineStatus(c *gin.Context) { flag := false grpcCons := getcdv3.GetConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImRelayName) for _, v := range grpcCons { + log.Debug(params.OperationID, "get node ", *v, v.Target()) client := pbRelay.NewRelayClient(v) reply, err := client.GetUsersOnlineStatus(context.Background(), req) if err != nil { diff --git a/internal/msg_gateway/gate/open_im_media/room.go b/internal/msg_gateway/gate/open_im_media/room.go index 83796da29..b840de39a 100644 --- a/internal/msg_gateway/gate/open_im_media/room.go +++ b/internal/msg_gateway/gate/open_im_media/room.go @@ -5,8 +5,6 @@ const ( Address = "127.0.0.1:11300" ) -//var roomClient *lksdk.RoomServiceClient - type Media struct { } @@ -14,45 +12,11 @@ func NewMedia() *Media { return &Media{} } -//func (m *Media) GetJoinToken(room, identity string, operationID string, data *open_im_sdk.ParticipantMetaData) (string, string, error) { -// var newData pbRtc.ParticipantMetaData -// copier.Copy(&newData, data) -// conn, err := grpc.Dial(Address, grpc.WithInsecure()) -// if err != nil { -// return "", "", err -// } -// defer conn.Close() -// c := pbRtc.NewRtcServiceClient(conn) -// req := &pbRtc.GetJoinTokenReq{Room: room, OperationID: operationID, Identity: identity, MetaData: &newData} -// resp, err := c.GetJoinToken(context.Background(), req) -// if err != nil { -// return "", "", err -// } -// if resp.CommonResp.ErrCode != 0 { -// return "", "", errors.New(resp.CommonResp.ErrMsg) -// } -// return resp.Jwt, resp.LiveURL, nil -// //at := auth.NewAccessToken(m.ApiKey, m.ApiSecret) -// //grant := &auth.VideoGrant{ -// // RoomJoin: true, -// // Room: room, -// //} -// //at.AddGrant(grant). -// // SetIdentity(identity). -// // SetValidFor(time.Hour) -// // -// //return at.ToJWT() -//} - func init() { - //roomClient = lksdk.NewRoomServiceClient(MediaAddress, ApiKey, ApiSecret) + } func (m *Media) CreateRoom(roomName string) (error, error) { return nil, nil - //return roomClient.CreateRoom(context.Background(), &livekit.CreateRoomRequest{ - // Name: roomName, - // EmptyTimeout: 60 * 3, - //}) } diff --git a/pkg/common/db/batch_insert_chat.go b/pkg/common/db/batch_insert_chat.go index bef5a312c..f2920813d 100644 --- a/pkg/common/db/batch_insert_chat.go +++ b/pkg/common/db/batch_insert_chat.go @@ -101,7 +101,7 @@ func (d *DataBases) BatchInsertChat2DB(userID string, msgList []*pbMsg.MsgDataTo return utils.Wrap(err, "") } } - log.NewWarn(operationID, "batch mgo cost time ", getCurrentTimestampByMill()-newTime, userID, len(msgList)) + log.Debug(operationID, "batch mgo cost time ", getCurrentTimestampByMill()-newTime, userID, len(msgList)) return nil }