summaryrefslogtreecommitdiff
path: root/settings.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2013-01-15 21:27:37 -0600
committerDan McGee <dan@archlinux.org>2013-01-15 21:27:37 -0600
commit3a6398f42d04ea6a677bf7b6d5115175e9011432 (patch)
treeff9b93bd252698c2f8ddc9aa79491f4317418957 /settings.py
parentaf32c23768c7537f19e0613525579208b4f44eb4 (diff)
Add new AlwaysCommitMiddleware to the stack
The reason for this is documented in the middleware itself. Without this, pgbouncer is of little use to us since it has to throw away every connection we try to route through it because of unclean disconnects. In theory, with the switch to using pgbouncer for all WSGI originating connections and adding this middleware, we should see a notable decrease in connection time to the database. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'settings.py')
-rw-r--r--settings.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/settings.py b/settings.py
index 8ed5cb61..cdc56e3e 100644
--- a/settings.py
+++ b/settings.py
@@ -66,6 +66,7 @@ TEMPLATE_LOADERS = (
)
MIDDLEWARE_CLASSES = (
+ 'main.middleware.AlwaysCommitMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',