Skip to content

Commit c48a37f

Browse files
author
Yang Guo
committed
fix missing update cmd status
1 parent 55c1a6d commit c48a37f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

platform-control-center/src/main/java/com/flow/platform/cc/service/AgentServiceImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ public List<Agent> list(String zone) {
156156

157157
@Override
158158
public void saveWithStatus(Agent agent, AgentStatus status) {
159+
if (agent == null || status == null) {
160+
return;
161+
}
162+
159163
if (!agentDao.exist(agent.getPath())) {
160164
throw new AgentErr.NotFoundException(agent.getName());
161165
}

platform-control-center/src/main/java/com/flow/platform/cc/service/CmdServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ public void updateStatus(CmdStatusItem statusItem, boolean inQueue) {
236236
return;
237237
}
238238

239+
// update cmd status
240+
save(cmd);
241+
239242
// compare exiting cmd result and update
240243
CmdResult inputResult = statusItem.getCmdResult();
241244

0 commit comments

Comments
 (0)