diff --git a/gauntlets.py b/gauntlets.py index 7590627..878d5a2 100644 --- a/gauntlets.py +++ b/gauntlets.py @@ -401,10 +401,13 @@ async def run_draft(interaction: discord.Interaction, main_team, this_event, dra # Call /players/random to get eight cards p_query = None - try: - p_query = db_get('players/random', params=params) - except requests.ReadTimeout as e: - logging.error(f'run_draft - timeout error pulling player with params {params}') + retries = 0 + while retries < 10: + try: + p_query = db_get('players/random', params=params) + break + except Exception as e: + retries += 1 if p_query['count'] > 0: test_player_list = ''