Browse Source

Merge "Setup model before connection"

tags/3.3.1
Zuul 5 months ago
parent
commit
3476bb8788
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      zuul/driver/sql/sqlconnection.py

+ 3
- 2
zuul/driver/sql/sqlconnection.py View File

@@ -47,6 +47,9 @@ class SQLConnection(BaseConnection):
47 47
 
48 48
         try:
49 49
             self.dburi = self.connection_config.get('dburi')
50
+            self.zuul_buildset_table, self.zuul_build_table \
51
+                = self._setup_models()
52
+
50 53
             # Recycle connections if they've been idle for more than 1 second.
51 54
             # MySQL connections are lightweight and thus keeping long-lived
52 55
             # connections around is not valuable.
@@ -55,8 +58,6 @@ class SQLConnection(BaseConnection):
55 58
                 poolclass=sqlalchemy.pool.QueuePool,
56 59
                 pool_recycle=self.connection_config.get('pool_recycle', 1))
57 60
             self._migrate()
58
-            self.zuul_buildset_table, self.zuul_build_table \
59
-                = self._setup_models()
60 61
             self.tables_established = True
61 62
         except sa.exc.NoSuchModuleError:
62 63
             self.log.exception(

Loading…
Cancel
Save