From f46b47df70c3b025a80d61e6f25b4c696929d5ab Mon Sep 17 00:00:00 2001 From: Shahzad Malik Muzaffar Date: Wed, 31 Jan 2018 17:36:56 +0100 Subject: [PATCH] fail the program on das errors --- das-utils/das_cache.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/das-utils/das_cache.py b/das-utils/das_cache.py index 49003ce2b641..c193d23af09b 100755 --- a/das-utils/das_cache.py +++ b/das-utils/das_cache.py @@ -118,6 +118,7 @@ def run_das_client(outfile, query, override, dasclient="das_client", threshold=9 nquery = 0 inCache = 0 DasSearch = 0 + error = 0 for query in uqueries: nquery += 1 sha = query_sha[query] @@ -178,8 +179,9 @@ def run_das_client(outfile, query, override, dasclient="das_client", threshold=9 error += 1 break else: - sleep(10) + sleep(2) for t in threads: t.join() print "Total queries: %s" % tqueries print "Found in object store: %s" % inCache print "DAS Search: %s" % DasSearch + exit(error)