From 28d3da67da3a9e0059ef2915f52b78a6b22a3e0c Mon Sep 17 00:00:00 2001 From: folland87 Date: Thu, 28 Mar 2024 12:18:55 +0100 Subject: [PATCH] fixes --- ecorda/api.py | 2 +- ecorda/load_all.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ecorda/api.py b/ecorda/api.py index 165c19e..970966e 100644 --- a/ecorda/api.py +++ b/ecorda/api.py @@ -10,7 +10,7 @@ PAGE_SIZE = 500 -@retry(delay=50, tries=25) +@retry(delay=10, tries=4) def get_page(url): try: r = requests.get(url, headers=get_headers()) diff --git a/ecorda/load_all.py b/ecorda/load_all.py index 6d7654c..e343304 100644 --- a/ecorda/load_all.py +++ b/ecorda/load_all.py @@ -27,7 +27,10 @@ def extraction_all(framework, liste_datas, url_ue): logger.error(f'Error in table {b}: {e}') datas_errors.append([b, e]) - logger.debug(f'Enpty tables: {datas_empty.join(",")}') - logger.debug(f'Loaded tables: {datas_load.join(",")}') - logger.debug(f'Error: {datas_errors}') + try: + logger.debug(f'Enpty tables: {datas_empty}') + logger.debug(f'Loaded tables: {datas_load}') + logger.debug(f'Error: {datas_errors}') + except Exception as e: + logger.error(f'Error in logging: {e}') return datas_load, datas_empty, datas_errors