From 0fab06a8589bb2d73cd90752b89660534394df9f Mon Sep 17 00:00:00 2001 From: Wilson Gaturu Date: Wed, 11 Oct 2023 12:34:58 +0300 Subject: [PATCH] configures CONN_MAX_AGE --- peachjam/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/peachjam/settings.py b/peachjam/settings.py index 11498b55e..483d3f558 100644 --- a/peachjam/settings.py +++ b/peachjam/settings.py @@ -183,6 +183,8 @@ "default": default_db_config, "gazettes_africa": gazette_db_config, } +CONN_MAX_AGE = int(os.environ.get("CONN_MAX_AGE", 0)) + # descriptive name for this application in psql's pg_stat_activity output, to help link connections to apps db_app_name = "-".join( [slugify(PEACHJAM["APP_NAME"]), os.environ.get("DYNO", "django")]