From bcf65603e47565e323ddbb6756012c298d12b594 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Tue, 20 Dec 2022 14:53:59 +0100 Subject: [PATCH] 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! --- src/pretix/settings.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pretix/settings.py b/src/pretix/settings.py index 2a7433481..0e415a7f2 100644 --- a/src/pretix/settings.py +++ b/src/pretix/settings.py @@ -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',