全局配置有变化时也提示更新集群

This commit is contained in:
刘祥超
2020-11-02 10:44:59 +08:00
parent cdb5dbc4e8
commit 7507a6261b
4 changed files with 25 additions and 2 deletions

View File

@@ -212,8 +212,14 @@ func (this *ServerDAO) UpdateServerConfig(serverId int64, configJSON []byte, upd
return false, err
}
globalConfig, err := SharedSysSettingDAO.ReadSetting(SettingCodeServerGlobalConfig)
if err != nil {
return false, err
}
m := md5.New()
_, _ = m.Write(configJSON)
_, _ = m.Write(configJSON) // 当前服务配置
_, _ = m.Write(globalConfig) // 全局配置
h := m.Sum(nil)
newConfigMd5 := fmt.Sprintf("%x", h)