Skip to content

Commit

Permalink
Reduced logging
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenplieger committed Dec 18, 2019
1 parent cdc62b5 commit 627c845
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -5,7 +5,7 @@

<groupId>nl.knmi.adagucservices</groupId>
<artifactId>adaguc-services</artifactId>
<version>1.2.3</version>
<version>1.2.4</version>

<name>adaguc-services</name>
<description>Backend for adaguc-server and adaguc-viewer</description>
Expand Down
10 changes: 2 additions & 8 deletions src/main/java/nl/knmi/adaguc/cron/AdagucServerScanLayers.java
Expand Up @@ -75,26 +75,22 @@ private void takeLayer(JSONObject layer, File datasetConfigFile) {
String layerName = null;
try {
autoScanAttrDirPattern = autoScanAttributes.getString("dirpattern");
Debug.println("autoScanAttrDirPattern" + autoScanAttrDirPattern);
} catch (Exception e) {
}

try {
autoScanAttrDuration = autoScanAttributes.getString("duration");
Debug.println("autoScanAttrDuration" + autoScanAttrDuration);
} catch (Exception e) {
}

try {
autoScanAttrStep = autoScanAttributes.getString("step");
Debug.println("autoScanAttrStep" + autoScanAttrStep);
} catch (Exception e) {
}


try {
layerName = layer.getJSONObject("Name").getString("value");
Debug.println("layerName" + layerName);
} catch (Exception e) {
}

Expand Down Expand Up @@ -125,7 +121,6 @@ private void takeLayer(JSONObject layer, File datasetConfigFile) {
*/
private void scanFilesForLayerUsingTailPath(File datasetConfigFile, String duration, String dirpattern, String step, String layerName) throws ElementNotFoundException, IOException, InterruptedException {
try {
Debug.println("scanFilesForLayerUsingTailPath");
java.time.Period d = java.time.Period.parse(duration);
java.time.Period s = java.time.Period.parse(step);
LocalDate minimumTime = LocalDate.now().minus(d);
Expand Down Expand Up @@ -176,11 +171,10 @@ private void scanAllFilesForLayer(File datasetConfigFile, String tailpath, Strin
args.add(layerName);
}
String[] commands = args.toArray(new String[0]);
Debug.println(String.join(" ", commands));
ADAGUCServer.runADAGUC("/tmp/", commands, outputStream);
outputStream.flush();
String getCapabilities = new String(outputStream.toByteArray());
Debug.println("\n" + getCapabilities);
String adagucResponse = new String(outputStream.toByteArray());
Debug.println("\n" + adagucResponse);
outputStream.close();
}
}

0 comments on commit 627c845

Please sign in to comment.