From b9feef52c331538f81249c1bc22f57c96f2d1e5b Mon Sep 17 00:00:00 2001 From: Kevin Smith Date: Thu, 24 Aug 2023 10:16:54 -0500 Subject: [PATCH] Add retries --- resources/init_db.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/init_db.py b/resources/init_db.py index 9df711aa..b0048b5e 100755 --- a/resources/init_db.py +++ b/resources/init_db.py @@ -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( @@ -83,3 +83,5 @@ print(f'WARNING: {exc}') time.sleep(30) tries -= 1 + if tries < 0: + raise