Commit 4768ef85639b62d40f4727771eb4258e662cd202

Authored by gaoming
1 parent 4139936c
Exists in master

发布多个项目

src/main/java/com/taover/bazhuayun/analysis/web/module/heartbeat/service/HeartbeatDeployServiceImpl.java
... ... @@ -32,15 +32,20 @@ public class HeartbeatDeployServiceImpl implements HeartbeatDeployService {
32 32 if(item.getInstance() == null || StringUtils.isBlank(item.getInstance().getDeployUrl())) {
33 33 return;
34 34 }
35   - String response = null;
36   - try {
37   - response = UtilHttpByOkHttp.sendGet(item.getInstance().getDeployUrl(), null);
38   - this.heartbeatReformService.sendReformDeploy(item);
39   - } catch (Exception e) {
40   - UtilLog.error("调用自动发布URL发生异常,发布URL["+item.getInstance().getDeployUrl()+"]", e, HeartbeatDeployServiceImpl.class);
41   - response = e.getMessage();
42   - this.heartbeatReformService.sendErrorMsg(item, response);
  35 + String deployUrl = item.getInstance().getDeployUrl();
  36 + String[] deployUrlArray = deployUrl.split(";");
  37 + for (int i = 0; i < deployUrlArray.length; i++) {
  38 + String response = null;
  39 + String realDeployUrl = deployUrlArray[i];
  40 + try {
  41 + response = UtilHttpByOkHttp.sendGet(realDeployUrl, null);
  42 + this.heartbeatReformService.sendReformDeploy(item);
  43 + } catch (Exception e) {
  44 + UtilLog.error("调用自动发布URL发生异常,发布URL["+realDeployUrl+"]", e, HeartbeatDeployServiceImpl.class);
  45 + response = e.getMessage();
  46 + this.heartbeatReformService.sendErrorMsg(item, response);
  47 + }
  48 + this.createDeployLog(item, response);
43 49 }
44   - this.createDeployLog(item, response);
45 50 }
46 51 }
... ...