mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-10 15:04:52 +03:00
Set CONN_MAX_AGE to 60 seconds -- fixes #710
Setting the value in the production config.
This commit is contained in:
parent
b2fbb36b9d
commit
89c9704f9a
|
@ -182,12 +182,14 @@ DATABASES = {
|
||||||
'PASSWORD': env('RDS_PASSWORD'),
|
'PASSWORD': env('RDS_PASSWORD'),
|
||||||
'HOST': env('RDS_HOSTNAME'),
|
'HOST': env('RDS_HOSTNAME'),
|
||||||
'PORT': env('RDS_PORT'),
|
'PORT': env('RDS_PORT'),
|
||||||
|
'CONN_MAX_AGE': 60,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
{% else %}
|
{% else %}
|
||||||
# Use the Heroku-style specification
|
# Use the Heroku-style specification
|
||||||
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
|
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
|
||||||
DATABASES['default'] = env.db('DATABASE_URL')
|
DATABASES['default'] = env.db('DATABASE_URL')
|
||||||
|
DATABASES['default']['CONN_MAX_AGE'] = 60
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# CACHING
|
# CACHING
|
||||||
|
|
Loading…
Reference in New Issue
Block a user