]> git.openstreetmap.org Git - nominatim.git/commitdiff
use correct SQLAlchemy pool for asynchronous connections
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 2 Jan 2024 15:15:44 +0000 (16:15 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 2 Jan 2024 15:15:44 +0000 (16:15 +0100)
See https://github.com/sqlalchemy/sqlalchemy/issues/8771

nominatim/api/core.py

index c0b83f8000fcf1d13c65e76135d5d1732125dd61..3481e647399b31cdd6c72201d34970b7a558fe17 100644 (file)
@@ -88,7 +88,7 @@ class NominatimAPIAsync: #pylint: disable=too-many-instance-attributes
             if self.config.get_int('API_POOL_SIZE') == 0:
                 extra_args['poolclass'] = sa.pool.NullPool
             else:
-                extra_args['poolclass'] = sa.pool.QueuePool
+                extra_args['poolclass'] = sa.pool.AsyncAdaptedQueuePool
                 extra_args['max_overflow'] = 0
                 extra_args['pool_size'] = self.config.get_int('API_POOL_SIZE')