[ARVADOS] updated: b5dc4ae38eb6da852e167952675aff59987a995c
Git user
git at public.curoverse.com
Tue Apr 12 14:00:40 EDT 2016
Summary of changes:
sdk/python/arvados/events.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
via b5dc4ae38eb6da852e167952675aff59987a995c (commit)
from 8ad62b017ea0dc84613eeb43f21f32890d9ed4ed (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 b5dc4ae38eb6da852e167952675aff59987a995c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Tue Apr 12 14:00:35 2016 -0400
8931: Add retry and exception handling around PollClient initial log query a well.
diff --git a/sdk/python/arvados/events.py b/sdk/python/arvados/events.py
index b272ce7..698601c 100644
--- a/sdk/python/arvados/events.py
+++ b/sdk/python/arvados/events.py
@@ -144,7 +144,15 @@ class PollClient(threading.Thread):
self.id = self.last_log_id
else:
for f in self.filters:
- items = self.api.logs().list(limit=1, order="id desc", filters=f).execute()['items']
+ try:
+ items = self.api.logs().list(limit=1, order="id desc", filters=f).execute(num_retries=1000000)['items']
+ except Exception as e:
+ # Some apparently non-retryable error happened, so log the
+ # error and shut down gracefully.
+ _logger.error("Got exception from log query: %s", e)
+ with self._closing_lock:
+ self._closing.set()
+ return
if items:
if items[0]['id'] > self.id:
self.id = items[0]['id']
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list