From 2b1b385e490009ebbbec91523c41091ed6827a7e Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Mon, 9 Nov 2015 00:15:57 +0000 Subject: [PATCH] moved to modern django connection pooling (of sorts) --- requirements.txt | 1 - settings.py | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 01eb5d9..2cc4eb8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,6 @@ dj_database_url==0.3.0 django-sslify==0.2.7 django_webtest==1.7.8 webtest==2.0.18 -django-db-pool==0.0.10 django-secure==1.0.1 bleach==1.4.1 boto==2.27.0 diff --git a/settings.py b/settings.py index 5527dbd..f1e2ab2 100644 --- a/settings.py +++ b/settings.py @@ -45,8 +45,8 @@ SOUTH_DATABASE_ADAPTERS = {'default':'south.db.postgresql_psycopg2'} if get_from_env('DATABASE_URL', None): import dj_database_url DATABASES['default'] = dj_database_url.config() - DATABASES['default']['ENGINE'] = 'dbpool.db.backends.postgresql_psycopg2' - DATABASES['default']['OPTIONS'] = {'MAX_CONNS': 1} + DATABASES['default']['ENGINE'] = 'django.db.backends.postgresql_psycopg2' + DATABASES['default']['CONN_MAX_AGE'] = 600 # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -- GitLab