提交 734956d4 authored 作者: blu's avatar blu

refactor of delta config

上级 960358ab
......@@ -465,9 +465,9 @@ private:
if(this->configMap["sn2mods"].count(sn) != 0) {
auto mods = this->configMap["sn2mods"][sn];
set<string> s;
for(const string & elem : mods) {
s.insert(this->configMap["mod2mgr"][elem].get<string>());
spdlog::info("evcloudsvc {}->{}", elem, this->configMap["mod2mgr"][elem].get<string>());
for(auto &[k,v]: mods.items()) {
s.insert(this->configMap["mod2mgr"][k].get<string>());
spdlog::info("evcloudsvc mod2mgr {}->{}", k, this->configMap["mod2mgr"][k].get<string>());
}
for(auto &key : s) {
......
......@@ -534,9 +534,10 @@ json getModulesOperFromConfDiff(json& oldConfig, json &newConfig, json &diff, st
ret["code"] = 1;
}
}catch(exception &e) {
spdlog::error("getModulesOperFromConfDiff exception: {}", e.what());
string msg = fmt::format("getModulesOperFromConfDiff exception: {}", e.what());
ret["code"] = -1;
ret["msg"] = e.what();
ret["msg"] = msg;
spdlog::error("getModulesOperFromConfDiff exception: {}", msg);
}
return ret;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论