Allow changing the POOL_SIZE and MAX_OVERFLOW config values of the pgAdmin config DB connection pool. #6208

This commit is contained in:
Yogesh Mahajan
2023-08-16 15:29:11 +05:30
committed by GitHub
parent 33b2b82ba9
commit 34f160cec7
3 changed files with 15 additions and 4 deletions

View File

@@ -23,7 +23,7 @@ from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.ext.mutable import MutableDict
import sqlalchemy.types as types
import uuid
import json
import config
##########################################################################
#
@@ -41,7 +41,12 @@ SCHEMA_VERSION = 35
#
##########################################################################
db = SQLAlchemy()
db = SQLAlchemy(
engine_options={
'pool_size': config.CONFIG_DATABASE_CONNECTION_POOL_SIZE,
'max_overflow': config.CONFIG_DATABASE_CONNECTION_MAX_OVERFLOW})
USER_ID = 'user.id'
SERVER_ID = 'server.id'