Skip to content
Snippets Groups Projects

double timeout each try

Merged Karim Ahmed requested to merge feat/double_timeout_caltools into master
2 unresolved threads
1 file
+ 2
0
Compare changes
  • Side-by-side
  • Inline
@@ -288,6 +288,7 @@ def get_from_db(device, constant, condition, empty_constant,
break
except zmq.error.Again:
ntries -= 1
timeout *= 2
sleep(np.random.randint(30))
except Exception as e:
if verbosity > 0:
@@ -354,6 +355,7 @@ def send_to_db(device, constant, condition, file_loc,
break
except zmq.error.Again:
ntries -= 1
timeout *= 2
sleep(np.random.randint(30))
if ntries == 0 and doraise:
raise
Loading