[ARVADOS] updated: a3b87eea221b1c169fd1e953c8263e63646a2da1

Git user git at public.curoverse.com
Tue Aug 30 09:49:03 EDT 2016


Summary of changes:
 apps/workbench/app/models/container_work_unit.rb | 4 ++--
 apps/workbench/app/models/work_unit.rb           | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

       via  a3b87eea221b1c169fd1e953c8263e63646a2da1 (commit)
      from  8da182df7745caa74c1406af3c458d8cf5532c70 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit a3b87eea221b1c169fd1e953c8263e63646a2da1
Author: Lucas Di Pentima <lucas at curoverse.com>
Date:   Tue Aug 30 10:47:32 2016 -0300

    9687: Added exit_code method to work_unit interface declarations. Simplified state_label method using the new exit_code accessor.

diff --git a/apps/workbench/app/models/container_work_unit.rb b/apps/workbench/app/models/container_work_unit.rb
index 248c763..afb5a03 100644
--- a/apps/workbench/app/models/container_work_unit.rb
+++ b/apps/workbench/app/models/container_work_unit.rb
@@ -75,8 +75,8 @@ class ContainerWorkUnit < ProxyWorkUnit
   end
 
   def state_label
-    exit_code = get_combined(:exit_code)
-    return "Failed" if (exit_code && exit_code != 0)
+    ec = exit_code
+    return "Failed" if (ec && ec != 0)
     get_combined(:state)
   end
 
diff --git a/apps/workbench/app/models/work_unit.rb b/apps/workbench/app/models/work_unit.rb
index 0d194b8..ce55bb3 100644
--- a/apps/workbench/app/models/work_unit.rb
+++ b/apps/workbench/app/models/work_unit.rb
@@ -41,6 +41,10 @@ class WorkUnit
     # returns a string representing state of the work unit
   end
 
+  def exit_code
+    # returns the work unit's execution exit code
+  end
+
   def state_bootstrap_class
     # returns a class like "danger", "success", or "warning" that a view can use directly to make a display class
   end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list