Merge branch 'master' of http://git.yoho.cn/ops/monitor-service
Showing
5 changed files
with
44 additions
and
12 deletions
@@ -19,4 +19,10 @@ public interface Constants { | @@ -19,4 +19,10 @@ public interface Constants { | ||
19 | 19 | ||
20 | String DNS_SCRIPT = "dns_nginx.sh"; | 20 | String DNS_SCRIPT = "dns_nginx.sh"; |
21 | 21 | ||
22 | + String ZIXUN_SCRIPT = "zixun_nginx.sh"; | ||
23 | + | ||
24 | + String MARS_SCRIPT = "mars_nginx.sh"; | ||
25 | + | ||
26 | + String GLOBAL_SCRIPT = "global_nginx.sh"; | ||
27 | + | ||
22 | } | 28 | } |
@@ -87,6 +87,18 @@ public class NginxSyncService { | @@ -87,6 +87,18 @@ public class NginxSyncService { | ||
87 | cmdTaskInfo.setCmd("/bin/bash " + Constants.SCRIPT_PATH + Constants.DNS_SCRIPT + args); | 87 | cmdTaskInfo.setCmd("/bin/bash " + Constants.SCRIPT_PATH + Constants.DNS_SCRIPT + args); |
88 | break; | 88 | break; |
89 | 89 | ||
90 | + case 4: | ||
91 | + cmdTaskInfo.setCmd("/bin/bash " + Constants.SCRIPT_PATH + Constants.ZIXUN_SCRIPT + args); | ||
92 | + break; | ||
93 | + | ||
94 | + case 5: | ||
95 | + cmdTaskInfo.setCmd("/bin/bash " + Constants.SCRIPT_PATH + Constants.MARS_SCRIPT + args); | ||
96 | + break; | ||
97 | + | ||
98 | + case 6: | ||
99 | + cmdTaskInfo.setCmd("/bin/bash " + Constants.SCRIPT_PATH + Constants.GLOBAL_SCRIPT + args); | ||
100 | + break; | ||
101 | + | ||
90 | default: | 102 | default: |
91 | break; | 103 | break; |
92 | } | 104 | } |
@@ -40,20 +40,23 @@ public class ReleaseRollBack { | @@ -40,20 +40,23 @@ public class ReleaseRollBack { | ||
40 | public void releaseRollBack() { | 40 | public void releaseRollBack() { |
41 | try { | 41 | try { |
42 | List<ReleaseWorkJob> list = releaseWorkJobMapper.selectForTask(); | 42 | List<ReleaseWorkJob> list = releaseWorkJobMapper.selectForTask(); |
43 | - for (ReleaseWorkJob releaseWorkJob : list){ | ||
44 | - if (!"JAVA".equals(releaseWorkJob.getPlatform())){ | 43 | + for (ReleaseWorkJob releaseWorkJob : list) { |
44 | + if (!"JAVA".equals(releaseWorkJob.getPlatform())) { | ||
45 | continue; | 45 | continue; |
46 | } | 46 | } |
47 | String[] environments = releaseWorkJob.getEnvironment().split(","); | 47 | String[] environments = releaseWorkJob.getEnvironment().split(","); |
48 | String[] projects = releaseWorkJob.getProject().split(","); | 48 | String[] projects = releaseWorkJob.getProject().split(","); |
49 | - for (String environment : environments){ | ||
50 | - for (String project : projects){ | 49 | + for (String environment : environments) { |
50 | + if ("qcloud_gray".equals(environment)) { | ||
51 | + continue; | ||
52 | + } | ||
53 | + for (String project : projects) { | ||
51 | Map<String, String> map = new HashMap<>(); | 54 | Map<String, String> map = new HashMap<>(); |
52 | map.put("project", project); | 55 | map.put("project", project); |
53 | map.put("environment", environment); | 56 | map.put("environment", environment); |
54 | - String rollbackJson = httpRestClientService.doGet(url+ "rollbackList", map); | ||
55 | - if (rollbackJson != null && !"failed".equals(rollbackJson)){ | ||
56 | - List<String> rollbackList = JSONArray.parseArray(rollbackJson,String.class); | 57 | + String rollbackJson = httpRestClientService.doGet(url + "rollbackList", map); |
58 | + if (rollbackJson != null && !"failed".equals(rollbackJson)) { | ||
59 | + List<String> rollbackList = JSONArray.parseArray(rollbackJson, String.class); | ||
57 | BuildRequest buildRequest = new BuildRequest(); | 60 | BuildRequest buildRequest = new BuildRequest(); |
58 | buildRequest.setUser("aotoRollback"); | 61 | buildRequest.setUser("aotoRollback"); |
59 | buildRequest.setEnvironment(environment); | 62 | buildRequest.setEnvironment(environment); |
@@ -65,13 +68,14 @@ public class ReleaseRollBack { | @@ -65,13 +68,14 @@ public class ReleaseRollBack { | ||
65 | 68 | ||
66 | } | 69 | } |
67 | } | 70 | } |
68 | - releaseWorkJob.setStatus(WorkStatus.AUTO_ROLLBACK); | ||
69 | - releaseWorkJobMapper.updateRollback(releaseWorkJob); | ||
70 | - workSystemSupport.workend(releaseWorkJob.getId(), WorkType.RELEASE_PROJECT,releaseWorkJob.getTitle(),WorkStatus.getCstatus(WorkStatus.AUTO_ROLLBACK)); | ||
71 | - | 71 | + if (!"qcloud_gray".equals(releaseWorkJob.getEnvironment())){ |
72 | + releaseWorkJob.setStatus(WorkStatus.AUTO_ROLLBACK); | ||
73 | + releaseWorkJobMapper.updateRollback(releaseWorkJob); | ||
74 | + workSystemSupport.workend(releaseWorkJob.getId(), WorkType.RELEASE_PROJECT, releaseWorkJob.getTitle(), WorkStatus.getCstatus(WorkStatus.AUTO_ROLLBACK)); | ||
75 | + } | ||
72 | } | 76 | } |
73 | 77 | ||
74 | - }catch (Exception e){ | 78 | + } catch (Exception e) { |
75 | e.printStackTrace(); | 79 | e.printStackTrace(); |
76 | } | 80 | } |
77 | } | 81 | } |
@@ -5,6 +5,9 @@ datasources: | @@ -5,6 +5,9 @@ datasources: | ||
5 | - 172.31.50.75:3306 | 5 | - 172.31.50.75:3306 |
6 | username: ops | 6 | username: ops |
7 | password: t5/oMgwUCmO/GeMHBAQ2Cg== | 7 | password: t5/oMgwUCmO/GeMHBAQ2Cg== |
8 | + maxConnections: 50 | ||
9 | + minIdle: 10 | ||
10 | + maxIdle: 50 | ||
8 | 11 | ||
9 | zabbix: | 12 | zabbix: |
10 | servers: | 13 | servers: |
@@ -12,6 +15,9 @@ datasources: | @@ -12,6 +15,9 @@ datasources: | ||
12 | - 10.66.0.191:3306 | 15 | - 10.66.0.191:3306 |
13 | username: zabbix_ops | 16 | username: zabbix_ops |
14 | password: YQ7VlkwN1Mum/fjaZARkKg== | 17 | password: YQ7VlkwN1Mum/fjaZARkKg== |
18 | + maxConnections: 50 | ||
19 | + minIdle: 10 | ||
20 | + maxIdle: 50 | ||
15 | daos: | 21 | daos: |
16 | - com.monitor.zabbix.mapper.ZabbixHistoryMapper | 22 | - com.monitor.zabbix.mapper.ZabbixHistoryMapper |
17 | - com.monitor.zabbix.mapper.ZabbixHostMapper | 23 | - com.monitor.zabbix.mapper.ZabbixHostMapper |
@@ -60,6 +60,10 @@ | @@ -60,6 +60,10 @@ | ||
60 | 60 | ||
61 | <logger name="com.yoho.core.dal.datasource.intercepor.DaoInterceptor" level="ERROR"></logger> | 61 | <logger name="com.yoho.core.dal.datasource.intercepor.DaoInterceptor" level="ERROR"></logger> |
62 | 62 | ||
63 | + <logger name="net.rubyeye.xmemcached.XMemcachedClient" level="ERROR"></logger> | ||
64 | + | ||
65 | + <logger name="com.google.code.yanf4j.core.impl.AbstractController" level="ERROR"></logger> | ||
66 | + | ||
63 | <!-- root级别 DEBUG --> | 67 | <!-- root级别 DEBUG --> |
64 | <root level="INFO"> | 68 | <root level="INFO"> |
65 | <!-- 文件输出 --> | 69 | <!-- 文件输出 --> |
-
Please register or login to post a comment