From 7f302e1448f5d518884540a7d1feed3c70239a8a Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Mon, 22 Apr 2019 17:33:06 -0400 Subject: [PATCH] Add environment variable for conn_max_age --- app/app/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app/settings.py b/app/app/settings.py index 641abba9..21dd43ac 100644 --- a/app/app/settings.py +++ b/app/app/settings.py @@ -198,7 +198,7 @@ LOGOUT_REDIRECT_URL = '/' # Change 'default' database configuration with $DATABASE_URL. DATABASES['default'].update(dj_database_url.config( env='DATABASE_URL', - conn_max_age=500, + conn_max_age=env.int('DATABASE_CONN_MAX_AGE', 500), ssl_require='sslmode' not in furl(env('DATABASE_URL', '')).args, ))