From 7e3620c2ce5273a08822dbfd5e7479e512ff0ad5 Mon Sep 17 00:00:00 2001 From: xiabin Date: Wed, 12 Feb 2025 18:37:51 +0800 Subject: [PATCH] fix --- .../internal/svc/service_context.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/douyin_ecpm_calculation_service/internal/svc/service_context.go b/app/douyin_ecpm_calculation_service/internal/svc/service_context.go index e73a912..5ca2eac 100644 --- a/app/douyin_ecpm_calculation_service/internal/svc/service_context.go +++ b/app/douyin_ecpm_calculation_service/internal/svc/service_context.go @@ -36,6 +36,8 @@ const EcpmConfigWatchKey = "ecpm_config" func (svc *ServiceContext) initEtcd() { + svc.EcpmConfig = NewEcpmConfig() + //初始化etcd客户端 cli, err := clientv3.NewFromURL(viper.GetString(config.EtcdAddrKey)) if err != nil { @@ -65,7 +67,6 @@ func (svc *ServiceContext) initEtcd() { }() svc.etcdCli = cli - svc.EcpmConfig = NewEcpmConfig() } // initAuthServiceClient inits the AuthServiceClient.