GutoVeronezi commented on a change in pull request #5588:
URL: https://github.com/apache/cloudstack/pull/5588#discussion_r792721752



##########
File path: 
framework/cluster/src/main/java/com/cloud/cluster/ClusterManagerImpl.java
##########
@@ -385,6 +401,35 @@ public void executeAsync(final String strPeer, final long 
agentId, final String
         addOutgoingClusterPdu(pdu);
     }
 
+    @Override
+    public void publishStatus(final String status) {
+        final Date cutTime = DateUtil.currentGMTTime();
+
+        final List<ManagementServerHostVO> peers = 
_mshostDao.getActiveList(new Date(cutTime.getTime() - 
HeartbeatThreshold.value()));
+        for (final ManagementServerHostVO peer : peers) {
+            final String peerName = Long.toString(peer.getMsid());
+            try {
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("Forwarding " + status + " to " + 
peer.getMsid());
+                }
+                sendStatus(peerName, status);
+            } catch (final Exception e) {
+                s_logger.warn("Caught exception while talking to " + 
peer.getMsid());

Review comment:
       Would be good too.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to