From e12820231e341c70a5790ba0ae0b26a90436265c Mon Sep 17 00:00:00 2001 From: Simon Ebner Date: Thu, 13 Dec 2018 15:06:24 +0100 Subject: [PATCH] make a lot of retries ... --- cadump/cadump.py | 3 ++- conda-recipe/meta.yaml | 2 +- setup.py | 2 +- tests/test_download_data.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/cadump/cadump.py b/cadump/cadump.py index 3cb49f0..cf7d2ae 100644 --- a/cadump/cadump.py +++ b/cadump/cadump.py @@ -91,7 +91,7 @@ def get_pulse_id_date_mapping(pulse_ids): "channels": ["SIN-CVME-TIFGUN-EVR0:BEAMOK"], "fields": ["pulseId", "globalDate"]} - for c in range(1): + for c in range(10): logger.info("Retrieve mapping for pulse_id %d" % pulse_id) # Query server @@ -126,6 +126,7 @@ def get_pulse_id_date_mapping(pulse_ids): date = data[0]["data"][0]["globalDate"] date = dateutil.parser.parse(date) dates.append(date) + break return dates except Exception: diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index b1ce859..2cc8b87 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,6 +1,6 @@ package: name: cadump - version: 0.0.6 + version: 0.0.7 source: path: .. diff --git a/setup.py b/setup.py index 3b82973..5e4285b 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name="cadump", - version="0.0.6", + version="0.0.7", author="Paul Scherrer Institute", author_email="daq@psi.ch", description="Interface to dump data from archiver/databuffer", diff --git a/tests/test_download_data.py b/tests/test_download_data.py index c32f7c5..e5e30e1 100644 --- a/tests/test_download_data.py +++ b/tests/test_download_data.py @@ -9,7 +9,7 @@ class TestDownloadData(TestCase): config = { 'range': { 'startPulseId': 7314794868, - 'endPulseId': 7414798868 + 'endPulseId': 7314798868 }, 'parameters': {