From 24001900f031d29e6824eb23426ccda3e0fc57cf Mon Sep 17 00:00:00 2001 From: Azulinho Date: Wed, 9 Aug 2023 10:00:27 +0100 Subject: [PATCH] increase timeout on get index_json --- utils/prove-backtesting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/prove-backtesting.py b/utils/prove-backtesting.py index 7486c0e..8299e68 100644 --- a/utils/prove-backtesting.py +++ b/utils/prove-backtesting.py @@ -16,13 +16,13 @@ import pandas as pd import requests import yaml -from tenacity import retry, wait_fixed, stop_after_delay +from tenacity import retry, wait_fixed, stop_after_attempt -@retry(wait=wait_fixed(2), stop=stop_after_delay(10)) +@retry(wait=wait_fixed(30), stop=stop_after_attempt(3)) def get_index_json(query: str) -> requests.Response: """retry wrapper for requests calls""" - response: requests.Response = requests.get(query, timeout=5) + response: requests.Response = requests.get(query, timeout=15) status: int = response.status_code if status != 200: with open("log/price_log_service.response.log", "at") as l: