Add sql alchemy engine options to common configurations.

This commit is contained in:
Patrick Jentsch 2020-01-07 11:32:46 +01:00
parent 65b00e47ed
commit 683bf93782

View File

@ -15,6 +15,7 @@ class Config:
MAIL_DEFAULT_SENDER = os.environ.get('MAIL_DEFAULT_SENDER')
''' ### Flask-SQLAlchemy ### '''
SQLALCHEMY_ENGINE_OPTIONS = {'pool_size': 30, 'pool_timeout': 30}
SQLALCHEMY_TRACK_MODIFICATIONS = False
''' ### Opaque ### '''
@ -31,8 +32,6 @@ class DevelopmentConfig(Config):
DEBUG = True
''' ### Flask-SQLAlchemy ### '''
SQLALCHEMY_ENGINE_OPTIONS = {'pool_size': 30,
'pool_timeout': 30}
SQLALCHEMY_DATABASE_URI = 'postgresql://{}:{}@db/{}'.format(
os.environ.get('POSTGRES_USER'),
os.environ.get('POSTGRES_PASSWORD'),