Skip to content

Commit

Permalink
Use postgres connection pool with default options
Browse files Browse the repository at this point in the history
  • Loading branch information
krysal committed Dec 18, 2024
1 parent d2cfcaf commit 571855e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions api/conf/settings/databases.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@
"USER": config("DJANGO_DATABASE_USER", default="deploy"),
"PASSWORD": config("DJANGO_DATABASE_PASSWORD", default="deploy"),
"NAME": config("DJANGO_DATABASE_NAME", default="openledger"),
# Default of 30 matches RDS documentation's advised max DNS caching time
# https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_BestPractices.html#CHAP_BestPractices.DiskPerformance
"CONN_MAX_AGE": config("DJANGO_CONN_MAX_AGE", default=30),
"CONN_HEALTH_CHECKS": config(
"DJANGO_CONN_HEALTH_CHECKS", default=True, cast=bool
),
"OPTIONS": {
"application_name": config(
"DJANGO_DATABASE_APPLICATION_NAME", default="openverse-api"
),
"pool": True,
},
}
}
2 changes: 1 addition & 1 deletion api/pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 571855e

Please sign in to comment.