diff options
-rw-r--r-- | bitbake/lib/hashserv/sqlalchemy.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bitbake/lib/hashserv/sqlalchemy.py b/bitbake/lib/hashserv/sqlalchemy.py index fc3ae3d339..f7b0226a7a 100644 --- a/bitbake/lib/hashserv/sqlalchemy.py +++ b/bitbake/lib/hashserv/sqlalchemy.py | |||
@@ -129,7 +129,11 @@ class DatabaseEngine(object): | |||
129 | return inspect(conn).has_table(name) | 129 | return inspect(conn).has_table(name) |
130 | 130 | ||
131 | self.logger.info("Using database %s", self.url) | 131 | self.logger.info("Using database %s", self.url) |
132 | self.engine = create_async_engine(self.url, poolclass=NullPool) | 132 | if self.url.drivername == 'postgresql+psycopg': |
133 | # Psygopg 3 (psygopg) driver can handle async connection pooling | ||
134 | self.engine = create_async_engine(self.url, max_overflow=-1) | ||
135 | else: | ||
136 | self.engine = create_async_engine(self.url, poolclass=NullPool) | ||
133 | 137 | ||
134 | async with self.engine.begin() as conn: | 138 | async with self.engine.begin() as conn: |
135 | # Create tables | 139 | # Create tables |