]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- do ten attempts to create database
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 19 Aug 2017 22:06:02 +0000 (18:06 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 19 Aug 2017 22:06:02 +0000 (18:06 -0400)
Change-Id: I14a5dd920d14096aa4401cb8b9d71f47d3915879

lib/sqlalchemy/testing/provision.py

index 9fb9eae8d4586520b03e2313529157f5e6402200..546def22ed198a56de3e0583d6c231a099a8b027 100644 (file)
@@ -168,7 +168,7 @@ def _pg_create_db(cfg, eng, ident):
                 conn.execute(
                     "CREATE DATABASE %s TEMPLATE %s" % (ident, currentdb))
             except exc.OperationalError as err:
-                if attempt != 2 and "accessed by other users" in str(err):
+                if attempt != 10 and "accessed by other users" in str(err):
                     time.sleep(.2)
                     continue
                 else: