summaryrefslogtreecommitdiffstats
path: root/hyperkitty/lib/__init__.py
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2012-09-06 11:08:10 +0200
committerAurélien Bompard <aurelien@bompard.org>2012-09-06 11:08:10 +0200
commit9877360a7f81943239d852de14eebf8be7674ad5 (patch)
tree835d3adec2ec9eba46233f5d7724aea9af4ceece /hyperkitty/lib/__init__.py
parent54f6eb7982a562a3526ee3b9be62fa6e9344dbdb (diff)
downloadhyperkitty-9877360a7f81943239d852de14eebf8be7674ad5.tar.gz
hyperkitty-9877360a7f81943239d852de14eebf8be7674ad5.tar.xz
hyperkitty-9877360a7f81943239d852de14eebf8be7674ad5.zip
Move the store pool to HyperKitty
Diffstat (limited to 'hyperkitty/lib/__init__.py')
-rw-r--r--hyperkitty/lib/__init__.py19
1 files changed, 0 insertions, 19 deletions
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'''