diff --git a/.cruft.json b/.cruft.json index 63f26b5..6a79cd1 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/OVINC-CN/DevTemplateDjango.git", - "commit": "985721fafdb113da04bee7519d87803ec4e62252", + "commit": "6957e612ab3e625ffd602eeed7ddfa462ac2f296", "checkout": "main", "context": { "cookiecutter": { diff --git a/entry/settings.py b/entry/settings.py index 0f170fd..52fb6df 100644 --- a/entry/settings.py +++ b/entry/settings.py @@ -100,6 +100,7 @@ "PASSWORD": getenv_or_raise("DB_PASSWORD"), "HOST": getenv_or_raise("DB_HOST"), "PORT": int(getenv_or_raise("DB_PORT")), + "CONN_MAX_AGE": int(os.getenv("DB_CONN_MAX_AGE", str(60 * 60))), "OPTIONS": {"charset": "utf8mb4"}, } }