Skip to content

Commit

Permalink
increase timeout on get index_json
Browse files Browse the repository at this point in the history
  • Loading branch information
Azulinho committed Aug 9, 2023
1 parent 12d3491 commit 2400190
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions utils/prove-backtesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2400190

Please sign in to comment.