瀏覽代碼

update

master
dengbiao 5 天之前
父節點
當前提交
85eb721ba6
共有 3 個檔案被更改,包括 5 行新增5 行删除
  1. +1
    -1
      internal/business/comm/service/svc_sys_cfg_get.go
  2. +1
    -1
      pkg/db/db.go
  3. +3
    -3
      pkg/rpc/rpc.go

+ 1
- 1
internal/business/comm/service/svc_sys_cfg_get.go 查看文件

@@ -21,7 +21,7 @@ func SysCfgFind(keys ...string) map[string]string {
// SysCfgFindComm get cfg by master id
func SysCfgFindComm(keys ...string) map[string]string {
res := map[string]string{}
cfgKey := fmt.Sprintf("egg_im_cfg_cache")
cfgKey := fmt.Sprintf(md.KEY_SYS_CFG_CACHE)
err := db2.RedisUtil.GetJson(cfgKey, &res)
if err != nil || len(res) == 0 {
cfgList, _ := db.DbSysCfg.SysCfgGetAll()


+ 1
- 1
pkg/db/db.go 查看文件

@@ -41,7 +41,7 @@ func InitRedis(addr, password string) {
logger.Logger.Info("init redis")
RedisCli = redis.NewClient(&redis.Options{
Addr: addr,
DB: 0,
DB: 1, //TODO::IM统一放1号库
Password: password,
})



+ 3
- 3
pkg/rpc/rpc.go 查看文件

@@ -58,10 +58,10 @@ func initConnectIntClient() {
}

func initBusinessIntClient() {
//conn, err := grpc.DialContext(context.TODO(), "127.0.0.1:8000", grpc.WithInsecure(),
// grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)))
conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "business", "8000"), grpc.WithInsecure(),
conn, err := grpc.DialContext(context.TODO(), "127.0.0.1:8000", grpc.WithInsecure(),
grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)))
//conn, err := grpc.DialContext(context.TODO(), k8s.GetK8STarget("egg-im", "business", "8000"), grpc.WithInsecure(),
// grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)))
if err != nil {
panic(err)
}


Loading…
取消
儲存