[PATCH] Experimental patch: Do not run datacage on artifacts that are loaded from datacage. His hopefully minimizes the datacage runs when a lot of data is loaded

Wald Commits scm-commit at wald.intevation.org
Fri Oct 25 03:49:57 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1382665624 -7200
# Node ID 505b05e223b159116127c4aeab7a4178b6021cf2
# Parent  73946c0007ffd2c33f0581f6764481a280b845bd
Experimental patch: Do not run datacage on artifacts that are loaded from datacage. His hopefully minimizes the datacage runs when a lot of data is loaded.

diff -r 73946c0007ff -r 505b05e223b1 artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Thu Oct 24 23:06:40 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/CollectionMonitor.java	Fri Oct 25 03:47:04 2013 +0200
@@ -45,6 +45,12 @@
     public void execute(Artifact artifact, CallContext context, Document doc) {
         D4EArtifact flys = (D4EArtifact) artifact;
 
+        // Do not generate recommendations for a loaded artifact.
+        String out = flys.getBoundToOut();
+        if (out != null && !out.isEmpty()) {
+            return;
+        }
+
         Element result = (Element) XMLUtils.xpath(
             doc,
             XPATH_RESULT,


More information about the Dive4elements-commits mailing list