Enable database health checks for when we use Django 4.1

4.1 is a while in the future but I really don't want to forget this then
as it is so useful!
This commit is contained in:
Raphael Michel
2022-12-20 14:53:59 +01:00
parent c4aed04a18
commit bcf65603e4

View File

@@ -130,6 +130,7 @@ DATABASES = {
'HOST': config.get('database', 'host', fallback=''),
'PORT': config.get('database', 'port', fallback=''),
'CONN_MAX_AGE': 0 if db_backend == 'sqlite3' else 120,
'CONN_HEALTH_CHECKS': db_backend != 'sqlite3', # Will only be used from Django 4.1 onwards
'OPTIONS': db_options,
'TEST': {
'CHARSET': 'utf8mb4',