Skip to content

Commit

Permalink
add mobile nodes count
Browse files Browse the repository at this point in the history
  • Loading branch information
erilong committed Nov 1, 2018
1 parent 6109bc0 commit 5a0a85a
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -44,6 +44,7 @@

import org.jumpmind.symmetric.ISymmetricEngine;
import org.jumpmind.symmetric.Version;
import org.jumpmind.symmetric.common.Constants;
import org.jumpmind.symmetric.common.ContextConstants;
import org.jumpmind.symmetric.common.ParameterConstants;
import org.jumpmind.symmetric.model.Channel;
Expand Down Expand Up @@ -285,6 +286,7 @@ protected void addUsageProperties(Properties prop) {

prop.put("db_type", symmetricDialect.getName());
prop.put("db_version", symmetricDialect.getVersion());
long mobileNodeCount = 0;
Set<String> databaseTypes = new HashSet<String>();
for (Node clientNode : engine.getNodeService().findAllNodes()) {
String databaseType = clientNode.getDatabaseType() + " " + clientNode.getDatabaseVersion();
Expand All @@ -295,7 +297,12 @@ protected void addUsageProperties(Properties prop) {
break;
}
}
String deployType = clientNode.getDeploymentType();
if (deployType.equals("android") || deployType.equals(Constants.DEPLOYMENT_TYPE_CCLIENT)) {
mobileNodeCount++;
}
}
prop.put("mobile_nodes", mobileNodeCount);

Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, -1);
Expand Down

0 comments on commit 5a0a85a

Please sign in to comment.