From c7ccbaabe5a833e8a299051df51ca71db4bafe02 Mon Sep 17 00:00:00 2001 From: Aurelien Duboc Date: Mon, 27 Feb 2023 03:41:23 +0100 Subject: [PATCH] Fix api instabilities --- main.py | 2 +- src/http_client.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3e762a3..e229efb 100644 --- a/main.py +++ b/main.py @@ -89,7 +89,7 @@ def update_number_rootme_challenges() -> None: @tl.job(interval=timedelta(days=1)) def update_number_rootme_users() -> None: - app.api.update_number_rootme_challenges() + app.api.update_number_rootme_users() def start_tl(): diff --git a/src/http_client.py b/src/http_client.py index e1311c7..7a8c06b 100644 --- a/src/http_client.py +++ b/src/http_client.py @@ -84,7 +84,7 @@ def __init__(self): retry = Retry( total=10, backoff_factor=1, - status_forcelist=[429], + status_forcelist=[429, 500, 502, 503, 504], ) adapter = HTTPAdapter(max_retries=retry, pool_maxsize=100, pool_block=True) session.mount('http://', adapter)