mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 17:42:23 +00:00
Close database connections after 10 seconds (experimental)
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
505a94e3aa
commit
6ac36fdb69
@ -221,6 +221,10 @@ if _db_type == 'mysql' or _db_type.startswith('postgres') or _db_type == 'psql':
|
||||
'PORT': os.environ.get('DJANGO_DB_PORT', ''), # Use default port
|
||||
}
|
||||
}
|
||||
|
||||
# Connections expire after 10 seconds
|
||||
CONN_MAX_AGE = 10
|
||||
CONN_HEALTH_CHECKS = True
|
||||
else:
|
||||
DATABASES = {
|
||||
'default': {
|
||||
|
Loading…
Reference in New Issue
Block a user