[Swift-commit] r2436 - provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Jan 11 05:39:05 CST 2009


Author: benc
Date: 2009-01-11 05:39:04 -0600 (Sun, 11 Jan 2009)
New Revision: 2436

Modified:
   provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
Log:
option to not pass through unix exit code as Status.FAILED, instead indicating Status.COMPLETED - this more closely models GRAM2

Modified: provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
===================================================================
--- provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java	2009-01-11 11:14:59 UTC (rev 2435)
+++ provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java	2009-01-11 11:39:04 UTC (rev 2436)
@@ -259,14 +259,20 @@
             if (killed) {
                 return;
             }
-            if (exitCode == 0) {
-                if(failDelay("completed")) {
-                    this.task.setStatus(Status.COMPLETED);
+
+            if(siteOptions.contains("nofailonexit"))  {
+                // suppress failures caused by exit code
+                this.task.setStatus(Status.COMPLETED);
+            } else { // normal fail behaviour
+                if (exitCode == 0) {
+                    if(failDelay("completed")) {
+                        this.task.setStatus(Status.COMPLETED);
+                    } else {
+                        this.task.setStatus(Status.FAILED);
+                    }
                 } else {
-                    this.task.setStatus(Status.FAILED);
+                    throw new JobException(exitCode);
                 }
-            } else {
-                throw new JobException(exitCode);
             }
         } catch (Exception e) {
             if (killed) {




More information about the Swift-commit mailing list