Skip to content

Commit

Permalink
added the timeout in the requests;
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjan-stha committed Jun 3, 2024
1 parent 30f074e commit 9279943
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analysis_module/mockserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
logger.setLevel(logging.INFO)


def get_entries_data(url: str) -> Any:
def get_entries_data(url: str, timeout: int=30) -> Any:
"""get data"""
response = requests.get(url)
response = requests.get(url, timeout=timeout)
entries_data = json.loads(response.text)
return entries_data

Expand Down

0 comments on commit 9279943

Please sign in to comment.