From 1d4e4eae94647ffebd770f45deff23a08721b984 Mon Sep 17 00:00:00 2001 From: Alexey Bezhan Date: Tue, 4 Dec 2018 11:48:28 +0000 Subject: [PATCH] Disable unused SQLAlchemy configuration flags We don't seem to use recorded queries or modification tracking anywhere in the app, and both features potentially increase memory usage. This removes deprecated SQLALCHEMY_COMMIT_ON_TEARDOWN options. It's been removed from the docs and the default matches the value we set anyway. --- app/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/config.py b/app/config.py index c38bb611f..d93d7c497 100644 --- a/app/config.py +++ b/app/config.py @@ -117,9 +117,8 @@ class Config(object): AWS_REGION = 'eu-west-1' INVITATION_EXPIRATION_DAYS = 2 NOTIFY_APP_NAME = 'api' - SQLALCHEMY_COMMIT_ON_TEARDOWN = False - SQLALCHEMY_RECORD_QUERIES = True - SQLALCHEMY_TRACK_MODIFICATIONS = True + SQLALCHEMY_RECORD_QUERIES = False + SQLALCHEMY_TRACK_MODIFICATIONS = False SQLALCHEMY_POOL_SIZE = int(os.environ.get('SQLALCHEMY_POOL_SIZE', 5)) SQLALCHEMY_POOL_TIMEOUT = 30 SQLALCHEMY_POOL_RECYCLE = 300