add in a wrapper to seclusion and solitude (bug 765355)

This commit is contained in:
Andy McKay 2012-06-26 11:54:10 -07:00
Родитель 8f53298633
Коммит 049fbfa95e
2 изменённых файлов: 28 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,21 @@
from django.conf import settings
from seclusion.base import Client
client = None
def get_client():
# If you haven't specified a seclusion host, we can't do anything.
if settings.SECLUSION_HOSTS:
config = {
# TODO: when seclusion can cope with multiple hosts, we'll pass
# them all through and let seclusion do its magic.
'server': settings.SECLUSION_HOSTS[0],
'key': settings.SECLUSION_KEY,
'secret': settings.SECLUSION_SECRET
}
return Client(config)
if not client:
client = get_client()

Просмотреть файл

@ -1460,3 +1460,10 @@ RUN_ES_TESTS = False
# For example, if receiptverifier is broken and you need to disable it, add
# 'receiptverifier' to the list. See also mkt/site/views.py.
MOZMARKET_VENDOR_EXCLUDE = []
# The configuration for seclusion the client that speaks to solitude.
# A tuple of the solitude hosts that seclusion will speak to.
SECLUSION_HOSTS = ()
# The oAuth key and secret that solitude needs.
SECLUSION_KEY = ''
SECLUSION_SECRET = ''