Skip to content

Commit

Permalink
break retry on success
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticroentgen committed Mar 11, 2024
1 parent 21de82f commit 2dbcc53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ async def on_ready():
wait_time = attempt * 5
print(f'\tAttempt {attempt} failed ({e}), retrying in {wait_time} seconds...')
time.sleep(wait_time)
else:
break
print("\tMax retries reached. Function execution failed.")

# Quit when done
Expand Down

0 comments on commit 2dbcc53

Please sign in to comment.