mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Fixing config file watch and config reload on license save (#5954)
* Fixing config file watch and config reload on license save * Fixing config file watch and config reload on license save * Fixing build error * Fixing locking issue
This commit is contained in:
committed by
Christopher Speller
parent
c4fd04efb6
commit
f0e451a2d3
@@ -137,8 +137,10 @@ func SaveConfig(cfg *model.Config) *model.AppError {
|
||||
}
|
||||
|
||||
//oldCfg := utils.Cfg
|
||||
utils.DisableConfigWatch()
|
||||
utils.SaveConfig(utils.CfgFileName, cfg)
|
||||
utils.LoadConfig(utils.CfgFileName)
|
||||
utils.EnableConfigWatch()
|
||||
|
||||
if einterfaces.GetMetricsInterface() != nil {
|
||||
if *utils.Cfg.MetricsSettings.Enable {
|
||||
|
||||
@@ -100,6 +100,9 @@ func SaveLicense(licenseBytes []byte) (*model.License, *model.AppError) {
|
||||
return nil, model.NewLocAppError("addLicense", model.INVALID_LICENSE_ERROR, nil, "")
|
||||
}
|
||||
|
||||
ReloadConfig()
|
||||
InvalidateAllCaches()
|
||||
|
||||
return license, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user