Skip to content

Commit

Permalink
Merge pull request #1570 from laws-africa/db-conn
Browse files Browse the repository at this point in the history
Configure CONN_MAX_AGE
  • Loading branch information
actlikewill authored Oct 13, 2023
2 parents 28ba763 + 0fab06a commit 1c87a87
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions peachjam/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down

0 comments on commit 1c87a87

Please sign in to comment.