support config clone timeout, do upgrades
This commit is contained in:
@ -120,9 +120,14 @@ func getInitConfigFunc(utils *util.Utils) func() {
|
||||
|
||||
// Load into struct to not be so darn pythonic, retrieving
|
||||
// settings by untyped string "name"
|
||||
conf := new(config.Config)
|
||||
conf := config.NewConfig()
|
||||
if err := viper.Unmarshal(&conf); err != nil {
|
||||
plog.Error("Failed loading config", plog.Args("err", err))
|
||||
plog.Fatal("Failed loading config", plog.Args("error", err))
|
||||
}
|
||||
|
||||
// Perform config updates
|
||||
if err := conf.Prepare(); err != nil {
|
||||
plog.Fatal("failed to parse clone timeout", plog.Args("error", err))
|
||||
}
|
||||
|
||||
utils.SetConfig(conf)
|
||||
|
Reference in New Issue
Block a user