[ARVADOS] updated: 4b585dc257f9a02492fd66a5322144864d06a1ec

git at public.curoverse.com git at public.curoverse.com
Thu Oct 22 12:03:41 EDT 2015


Summary of changes:
 sdk/python/arvados/__init__.py             | 13 +++++++------
 sdk/python/tests/test_retry_job_helpers.py |  1 -
 2 files changed, 7 insertions(+), 7 deletions(-)

       via  4b585dc257f9a02492fd66a5322144864d06a1ec (commit)
      from  98fd71e2bde6997936fff359880a4d5993df6605 (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 4b585dc257f9a02492fd66a5322144864d06a1ec
Author: Tom Clegg <tom at curoverse.com>
Date:   Thu Oct 22 12:03:09 2015 -0400

    6600: Break out of RetryLoop on success

diff --git a/sdk/python/arvados/__init__.py b/sdk/python/arvados/__init__.py
index b487b77..3c4c93c 100644
--- a/sdk/python/arvados/__init__.py
+++ b/sdk/python/arvados/__init__.py
@@ -45,12 +45,13 @@ def task_set_output(self,s,api_client=None,num_retries=5):
 
     for tries_left in RetryLoop(num_retries=num_retries, backoff_start=0):
         try:
-            api_client.job_tasks().update(uuid=self['uuid'],
-                                                 body={
-                                                      'output':s,
-                                                      'success':True,
-                                                      'progress':1.0
-                                                     }).execute()
+            return api_client.job_tasks().update(
+                uuid=self['uuid'],
+                body={
+                    'output':s,
+                    'success':True,
+                    'progress':1.0
+                }).execute()
         except errors.ApiError as error:
             if retry.check_http_response_success(error.resp.status) is None and tries_left > 0:
                 logger.debug("task_set_output: job_tasks().update() raised {}, retrying with {} tries left".format(repr(error),tries_left))
diff --git a/sdk/python/tests/test_retry_job_helpers.py b/sdk/python/tests/test_retry_job_helpers.py
index 9777e09..9d4d9ba 100644
--- a/sdk/python/tests/test_retry_job_helpers.py
+++ b/sdk/python/tests/test_retry_job_helpers.py
@@ -20,7 +20,6 @@ class ApiClientRetryTestMixin(object):
     @classmethod
     def setUpClass(cls):
         run_test_server.run()
-        cls.api = arvados.api('v1')
 
     def tearDown(self):
         run_test_server.reset()

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list