mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
db pool config options
This commit is contained in:
parent
df450acd3d
commit
01d82939e0
2 changed files with 4 additions and 1 deletions
|
@ -32,7 +32,7 @@ def get_locale():
|
|||
return 'en'
|
||||
|
||||
|
||||
db = SQLAlchemy(session_options={"autoflush": False}) # engine_options={'pool_size': 5, 'max_overflow': 10} # session_options={"autoflush": False}
|
||||
db = SQLAlchemy(session_options={"autoflush": False}, engine_options={'pool_size': Config.DB_POOL_SIZE, 'max_overflow': Config.DB_MAX_OVERFLOW}) # engine_options={'pool_size': 5, 'max_overflow': 10} # session_options={"autoflush": False}
|
||||
migrate = Migrate()
|
||||
login = LoginManager()
|
||||
login.login_view = 'auth.login'
|
||||
|
|
|
@ -58,3 +58,6 @@ class Config(object):
|
|||
SPICY_UNDER_60 = float(os.environ.get('SPICY_UNDER_60', 1.0))
|
||||
|
||||
IPINFO_TOKEN = os.environ.get('IPINFO_TOKEN') or ''
|
||||
|
||||
DB_POOL_SIZE = os.environ.get('DB_POOL_SIZE') or 10
|
||||
DB_MAX_OVERFLOW = os.environ.get('DB_MAX_OVERFLOW') or 30
|
||||
|
|
Loading…
Reference in a new issue