Skip to content

Commit 209e9e6

Browse files
author
yang.guo
authored
Merge pull request #204 from FlowCI/develop
Develop
2 parents 278ceb2 + 3454962 commit 209e9e6

File tree

6 files changed

+4
-3
lines changed

6 files changed

+4
-3
lines changed

platform-api/src/main/java/com/flow/platform/api/service/SyncServiceImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import com.flow.platform.core.queue.PriorityMessage;
2727
import com.flow.platform.domain.Agent;
2828
import com.flow.platform.domain.AgentPath;
29+
import com.flow.platform.domain.AgentStatus;
2930
import com.flow.platform.domain.Cmd;
3031
import com.flow.platform.domain.CmdInfo;
3132
import com.flow.platform.domain.CmdResult;
@@ -95,6 +96,9 @@ private void init() {
9596

9697
List<Agent> agents = agentService.list();
9798
for (Agent agent : agents) {
99+
if (agent.getStatus() == AgentStatus.OFFLINE) {
100+
continue;
101+
}
98102
register(agent.getPath());
99103
}
100104
} catch (Throwable e) {

platform-control-center/src/main/java/com/flow/platform/cc/consumer/CmdQueueConsumer.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ public class CmdQueueConsumer implements QueueListener<PriorityMessage> {
6060
@Autowired
6161
private CmdDispatchService cmdDispatchService;
6262

63-
@Autowired
64-
private AgentService agentService;
65-
6663
@Autowired
6764
private PlatformQueue<PriorityMessage> cmdQueue;
6865

0 commit comments

Comments
 (0)