Skip to content

Commit ba8b731

Browse files
ci: DB persistence for blobdb, too
1 parent 5e1f46d commit ba8b731

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

k8s/settings_local.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,17 @@ def _multiline_to_list(s):
114114

115115
# Configure persistent connections. A setting of 0 is Django's default.
116116
_conn_max_age = os.environ.get("DATATRACKER_DB_CONN_MAX_AGE", "0")
117-
# A string "none" means unlimited age.
118-
DATABASES["default"]["CONN_MAX_AGE"] = (
119-
None if _conn_max_age.lower() == "none" else int(_conn_max_age)
120-
)
117+
for dbname in ["default", "blobdb"]:
118+
# A string "none" means unlimited age.
119+
DATABASES[dbname]["CONN_MAX_AGE"] = (
120+
None if _conn_max_age.lower() == "none" else int(_conn_max_age)
121+
)
121122
# Enable connection health checks if DATATRACKER_DB_CONN_HEALTH_CHECK is the string "true"
122123
_conn_health_checks = bool(
123124
os.environ.get("DATATRACKER_DB_CONN_HEALTH_CHECKS", "false").lower() == "true"
124125
)
125-
DATABASES["default"]["CONN_HEALTH_CHECKS"] = _conn_health_checks
126+
for dbname in ["default", "blobdb"]:
127+
DATABASES[dbname]["CONN_HEALTH_CHECKS"] = _conn_health_checks
126128

127129
# DATATRACKER_ADMINS is a newline-delimited list of addresses parseable by email.utils.parseaddr
128130
_admins_str = os.environ.get("DATATRACKER_ADMINS", None)

0 commit comments

Comments
 (0)