summaryrefslogtreecommitdiffstats
path: root/hyperkitty/models.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-09-12 09:31:21 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-09-12 09:31:21 +0200
commit643a4a97ff7cd5013e25d2eeb6bcc68cf524c1d7 (patch)
tree76dd05d2ed331893eb1e486a2ca0287202c2ac05 /hyperkitty/models.py
parente2160d63f1d07817a6aee7f601666792e243dc2d (diff)
downloadhyperkitty-643a4a97ff7cd5013e25d2eeb6bcc68cf524c1d7.tar.gz
hyperkitty-643a4a97ff7cd5013e25d2eeb6bcc68cf524c1d7.tar.xz
hyperkitty-643a4a97ff7cd5013e25d2eeb6bcc68cf524c1d7.zip
Use a middleware to avoid KS connection leaks
Diffstat (limited to 'hyperkitty/models.py')
-rw-r--r--hyperkitty/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/hyperkitty/models.py b/hyperkitty/models.py
index dae055a..6a8bd63 100644
--- a/hyperkitty/models.py
+++ b/hyperkitty/models.py
@@ -61,6 +61,8 @@ class UserProfile(models.Model):
except Rating.DoesNotExist:
votes = {}
+ # TODO: warning, not thread-safe, should get the cached connection from
+ # the WSGI environment
store = get_store(settings.KITTYSTORE_URL)
for vote in votes:
list_name = vote.list_address.split('@')[0]