Browse Source

fail early if two filer stores are defined

pull/800/head
Chris Lu 6 years ago
parent
commit
63619f8b8e
  1. 11
      weed/filer2/configuration.go

11
weed/filer2/configuration.go

@ -13,6 +13,17 @@ var (
func (f *Filer) LoadConfiguration(config *viper.Viper) {
enabledStore := ""
for _, store := range Stores {
if config.GetBool(store.GetName() + ".enabled") {
if enabledStore == "" {
enabledStore = store.GetName()
} else {
glog.Fatalf("Filer store is enabled for both %s and %s", enabledStore, store.GetName())
}
}
}
for _, store := range Stores {
if config.GetBool(store.GetName() + ".enabled") {
viperSub := config.Sub(store.GetName())

Loading…
Cancel
Save