Displaying differences for changeset
 
display as  

src/java/m/oms/ages/V1_01cp.java

@@ -27,7 +27,7 @@
 @Description("OMS based AGES model service, new ET-crop related override")
 @VersionInfo("1.01cp")
 @Path("m/ages/1.0.1cp")
-@Polling(first = 4000, next = 3500)
+@Polling(first = 5000, next = 2000)
 @Resource(file = "/bin/ages_1_0_cropID/ages.jar", type = JAR, id = Utils.ID_AGES_JAR)
 @Resource(file = "/bin/ages_1_0_cropID/ages-lib.zip", type = ARCHIVE)
 @Resource(file = "java-*-std*.txt output/csip_run/out/*.csv", type = OUTPUT)
@@ -100,7 +100,6 @@
         //File dataFolder = !payLoad ? new File(Config.getString(Config.CSIP_BIN_DIR) + "/ages_1_0/data/" + data_folder) : workspace().getDir();
         //if (project.equals("SFIR3")) {
         dataFolder = !payLoad ? new File(LOCATION_MNT_DATA + "/ages_projects/ages_1_0/" + project + "/data/") : workspace().getDir();
-        System.out.println(dataFolder);
         //}
 
         Utils.processFileParameters(parameter(), dataFolder, workspace().getDir(), agesParam);
@@ -143,4 +142,9 @@
             cosu().setValue(name, result);
         }
     }
+
+    @Override
+    protected void postProcess() throws Exception {
+        results().put("running ", "ran");
+    }
 }

src/java/oms/utils/Utils.java

@@ -545,7 +545,7 @@
                 jvmOptions, // jvm options
                 ws, // workspace dir
                 Arrays.asList(res.getFile(ID_AGES_JAR)), // the ages jar file
-                param.getString(KEY_LOGLEVEL, "INFO"), // The log level
+                param.getString(KEY_LOGLEVEL, "OFF"), // The log level
                 LOG); // This session logger
     }
 
@@ -566,12 +566,12 @@
         Executable p = createProcessNew(dsl, ws, param, res, ages, LOG);
         int result = p.exec();
         if (result > 0) {
-//            File f = p.stderr();
-//            if (f.exists() && f.length() > 10) {
-//                String err = FileUtils.readFileToString(f, "UTF-8");
-//                LOG.info("Ages execution error. " + f + ":\n" + err);
-//                throw new ServiceException("Ages execution error. " + f + ":\n" + err);
-//            }
+            File f = p.stderr();
+            if (f.exists() && f.length() > 10) {
+                String err = FileUtils.readFileToString(f, "UTF-8");
+                LOG.info("Ages execution error. " + f + ":\n" + err);
+                throw new ServiceException("Ages execution error. " + f + ":\n" + err);
+            }
             throw new ServiceException(LOCATION_MNT_DATA + " Ages execution error." + result);
         }
     }
@@ -608,7 +608,7 @@
                 jvmOptions, // jvm options
                 ws, // workspace dir
                 Arrays.asList(res.getFile(ID_AGES_JAR)), // the ages jar file
-                param.getString(KEY_LOGLEVEL, "FINE"), // The log level
+                param.getString(KEY_LOGLEVEL, "OFF"), // The log level
                 LOG); // This session logger
     }