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