Skip to content

Commit 20017da

Browse files
committed
Expand the logic in our proxito mixin.
This makes proxito mixin match production for .com/.org in the areas where we are overriding the same things.
1 parent 5691b4e commit 20017da

File tree

1 file changed

+10
-0
lines changed
  • readthedocs/settings/proxito

1 file changed

+10
-0
lines changed

readthedocs/settings/proxito/base.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,21 @@
66
a staged rollout of the proxito code.
77
"""
88

9+
910
class CommunityProxitoSettingsMixin:
1011

1112
ROOT_URLCONF = 'readthedocs.proxito.urls'
1213
USE_SUBDOMAIN = True
1314

15+
@property
16+
def DATABASES(self):
17+
# This keeps connections to the DB alive,
18+
# which reduces latency with connecting to postgres
19+
dbs = getattr(super(), 'DATABASES', {})
20+
for db in dbs.keys():
21+
dbs[db]['CONN_MAX_AGE'] = 86400
22+
return dbs
23+
1424
@property
1525
def MIDDLEWARE(self): # noqa
1626
# Use our new middleware instead of the old one

0 commit comments

Comments
 (0)