Skip to content

Commit

Permalink
add load config file when sync fail
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyx committed Dec 1, 2020
1 parent 7352aa9 commit 23309c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions component/remote/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ func (a *syncApolloConfig) Sync(appConfig *config.AppConfig) []*config.ApolloCon
configs := make([]*config.ApolloConfig, 0, 8)
config.SplitNamespaces(appConfig.NamespaceName, func(namespace string) {
apolloConfig := a.SyncWithNamespace(namespace, appConfig)
if apolloConfig == nil {
if apolloConfig != nil {
configs = append(configs, apolloConfig)
return
}

configs = append(configs, apolloConfig)
configs = append(configs, loadBackupConfig(appConfig.NamespaceName, appConfig)...)
})
return configs
}

0 comments on commit 23309c2

Please sign in to comment.