From 9877360a7f81943239d852de14eebf8be7674ad5 Mon Sep 17 00:00:00 2001 From: Aurélien Bompard Date: Thu, 6 Sep 2012 11:08:10 +0200 Subject: Move the store pool to HyperKitty --- hyperkitty/lib/__init__.py | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'hyperkitty/lib/__init__.py') diff --git a/hyperkitty/lib/__init__.py b/hyperkitty/lib/__init__.py index 9b541f9..be8e27d 100644 --- a/hyperkitty/lib/__init__.py +++ b/hyperkitty/lib/__init__.py @@ -2,31 +2,12 @@ import urllib from hashlib import md5 -import threading import datetime from django.conf import settings from hyperkitty.utils import log -import kittystore - - -class ThreadSafeStorePool(object): - """ - http://unpythonic.blogspot.fr/2007/11/using-storm-and-sqlite-in-multithreaded.html - """ - - def __init__(self): - self._local = threading.local() - - def get(self): - try: - return self._local.store - except AttributeError: - self._local.store = kittystore.get_store(settings.KITTYSTORE_URL, debug=False) - return self._local.store - def gravatar_url(email): '''Return a gravatar url for an email address''' -- cgit