[ARVADOS] updated: 16ed3c023655eba037012eb3e046f0ed333f33b6

Git user git at public.curoverse.com
Thu Mar 10 11:36:53 EST 2016


Summary of changes:
 sdk/cwl/arvados_cwl/__init__.py | 25 +++----------------------
 1 file changed, 3 insertions(+), 22 deletions(-)

       via  16ed3c023655eba037012eb3e046f0ed333f33b6 (commit)
      from  68b6917bd994ac608fa70f160643a070b7ead159 (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 16ed3c023655eba037012eb3e046f0ed333f33b6
Author: radhika <radhika at curoverse.com>
Date:   Thu Mar 10 11:36:12 2016 -0500

    8558: compacted code

diff --git a/sdk/cwl/arvados_cwl/__init__.py b/sdk/cwl/arvados_cwl/__init__.py
index d9f71a6..fbbbdee 100644
--- a/sdk/cwl/arvados_cwl/__init__.py
+++ b/sdk/cwl/arvados_cwl/__init__.py
@@ -154,28 +154,9 @@ class ArvadosJob(object):
 
         resources = self.builder.resources
         if resources is not None:
-            if "cores" in resources:
-                try:
-                    runtime_constraints["min_cores_per_node"] = int(resources["cores"])
-                except:
-                    runtime_constraints["min_cores_per_node"] = None
-            if "ram" in resources:
-                try:
-                    runtime_constraints["min_ram_mb_per_node"] = int(resources["ram"])
-                except:
-                    runtime_constraints["min_ram_mb_per_node"] = None
-            if "tmpdirSize" in resources or "outdirSize" in resources:
-                tmpdirMin = None
-                try:
-                    tmpdirMin = int(resources["tmpdirSize"])
-                except:
-                    tmpdirMin = 0
-                outdirMin = None
-                try:
-                    outdirMin = int(resources["outdirSize"])
-                except:
-                    outdirMin = 0
-                runtime_constraints["min_scratch_mb_per_node"] = tmpdirMin + outdirMin
+            runtime_constraints["min_cores_per_node"] = resources.get("cores")
+            runtime_constraints["min_ram_mb_per_node"] = resources.get("ram")
+            runtime_constraints["min_scratch_mb_per_node"] = resources.get("tmpdirSize", 0) + resources.get("outdirSize", 0)
 
         try:
             response = self.arvrunner.api.jobs().create(body={

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list