From ed77a8fb3c6885cd0a358bd04e763faa4e1e18f5 Mon Sep 17 00:00:00 2001 From: Karim Ahmed <karim.ahmed@xfel.eu> Date: Thu, 16 Jan 2020 13:32:59 +0100 Subject: [PATCH] double timeout each try --- cal_tools/cal_tools/tools.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cal_tools/cal_tools/tools.py b/cal_tools/cal_tools/tools.py index 2943381d8..9d2cc08bb 100644 --- a/cal_tools/cal_tools/tools.py +++ b/cal_tools/cal_tools/tools.py @@ -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 -- GitLab