Skip to content

Commit

Permalink
Merge pull request apolloconfig#412 from nobodyiam/tooling-cluster-new
Browse files Browse the repository at this point in the history
Tooling cluster new
  • Loading branch information
lepdou authored Sep 19, 2016
2 parents 33c59a5 + 455782f commit 33b2d12
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@Named(type = ConfigUtil.class)
public class ConfigUtil {
private static final Logger logger = LoggerFactory.getLogger(ConfigUtil.class);
private static final String TOOLS_CLUSTER = "TOOLS";
private static final String TOOLING_CLUSTER = "TOOLING";
private int refreshInterval = 5;
private TimeUnit refreshIntervalTimeUnit = TimeUnit.MINUTES;
private int connectTimeout = 1000; //1 second
Expand Down Expand Up @@ -65,9 +65,9 @@ private void initCluster() {
//Load data center from system property
cluster = System.getProperty(ConfigConsts.APOLLO_CLUSTER_KEY);

//Use TOOLS cluster if tools=true in server.properties
//Use TOOLING cluster if tooling=true in server.properties
if (Strings.isNullOrEmpty(cluster) && isToolingZone()) {
cluster = TOOLS_CLUSTER;
cluster = TOOLING_CLUSTER;
}

//Use data center as cluster
Expand All @@ -82,7 +82,7 @@ private void initCluster() {
}

private boolean isToolingZone() {
if ("true".equalsIgnoreCase(Foundation.server().getProperty("tools", "false").trim())) {
if ("true".equalsIgnoreCase(Foundation.deployment().getProperty("tooling", "false").trim())) {
return true;
}
return false;
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<dependency>
<groupId>com.ctrip.framework</groupId>
<artifactId>framework-foundation</artifactId>
<version>1.1.7</version>
<version>1.1.8-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.dianping.cat</groupId>
Expand Down

0 comments on commit 33b2d12

Please sign in to comment.