提交 5ded2235 authored 作者: blu's avatar blu

cloud cmd api for platform client

上级 2765b7d3
...@@ -287,7 +287,13 @@ private: ...@@ -287,7 +287,13 @@ private:
json &mods = jret["data"]; json &mods = jret["data"];
if(mods.size() == 0) { if(mods.size() == 0) {
spdlog::info("evdaemon {} startSubSystems: no module to operate", this->devSn); spdlog::info("evdaemon {} startSubSystems: no module to operate", this->devSn);
return ret;
} }
// there is diff. restart evmgr first
string mgrId = this->devSn + ":evmgr:0";
sendCmd2Peer(mgrId, EV_MSG_META_VALUE_CMD_STOP, "0");
for(auto &[k,v]: mods.items()) { for(auto &[k,v]: mods.items()) {
spdlog::info("evdaemon {} startSubSystems config diff to module action: {} -> {}", this->devSn, string(k), int(v)); spdlog::info("evdaemon {} startSubSystems config diff to module action: {} -> {}", this->devSn, string(k), int(v));
if(v == 0) { if(v == 0) {
...@@ -295,7 +301,7 @@ private: ...@@ -295,7 +301,7 @@ private:
} }
else if(int(v) == 1 || int(v) == 2) { else if(int(v) == 1 || int(v) == 2) {
int status = (this->peerData["status"].count(k) == 0) ? -1:this->peerData["status"][k].get<int>(); int status = (this->peerData["status"].count(k) == 0) ? -1:this->peerData["status"][k].get<int>();
spdlog::info("{} status {}", k, status); spdlog::info("evdaemon module {} status {}", this->devSn, k, status);
if(this->peerData["status"].count(k) == 0 || this->peerData["status"][k] == 0||this->peerData["status"][k] == -1) { if(this->peerData["status"].count(k) == 0 || this->peerData["status"][k] == 0||this->peerData["status"][k] == -1) {
pid_t pid; pid_t pid;
spdlog::info("evdaemon {} starting subsystem {}", this->devSn, k); spdlog::info("evdaemon {} starting subsystem {}", this->devSn, k);
......
...@@ -114,7 +114,7 @@ error_exit: ...@@ -114,7 +114,7 @@ error_exit:
return ret; return ret;
} }
int handleMsg(vector<vector<uint8_t> > &body) int handleEdgeMsg(vector<vector<uint8_t> > &body)
{ {
int ret = 0; int ret = 0;
zmq_msg_t msg; zmq_msg_t msg;
...@@ -267,7 +267,7 @@ protected: ...@@ -267,7 +267,7 @@ protected:
continue; continue;
} }
// full proto msg received. // full proto msg received.
handleMsg(body); handleEdgeMsg(body);
} }
} }
public: public:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论