Skip to content

Commit

Permalink
Add retries
Browse files Browse the repository at this point in the history
  • Loading branch information
kesmit13 committed Aug 24, 2023
1 parent f0c7c0d commit b9feef5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions resources/init_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
if not database:
database = 'TEMP_{}'.format(uuid.uuid4()).replace('-', '_')

tries = 10
while tries > 0:
tries = 25
while True:

try:
with s2.connect(
Expand All @@ -83,3 +83,5 @@
print(f'WARNING: {exc}')
time.sleep(30)
tries -= 1
if tries < 0:
raise

0 comments on commit b9feef5

Please sign in to comment.