Skip to content

Commit

Permalink
Merge pull request #102 from wang371758198/master
Browse files Browse the repository at this point in the history
在获取remoteconfig失败时加载本地缓存的配置信息进行容灾处理
  • Loading branch information
zouyx committed Mar 18, 2020
2 parents e382f21 + a86af40 commit 92df33d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions component/notify/componet_notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ func syncConfigs(namespace string, isAsync bool) error {

remoteConfigs, err := notifyRemoteConfig(nil, namespace, isAsync)

if err != nil || len(remoteConfigs) == 0 {
appConfig := env.GetPlainAppConfig()
loadBackupConfig(appConfig.NamespaceName, appConfig)
}

if err != nil {
return fmt.Errorf("notifySyncConfigServices: %s", err)
}
Expand Down

0 comments on commit 92df33d

Please sign in to comment.