Skip to content
Snippets Groups Projects
Commit 28f44817 authored by Ben Adida's avatar Ben Adida
Browse files

more progress, upgrading kombu but not working yet in async

parent 700aa200
No related branches found
No related tags found
No related merge requests found
...@@ -41,9 +41,14 @@ def getOpenIDStore(filestore_path, table_prefix): ...@@ -41,9 +41,14 @@ def getOpenIDStore(filestore_path, table_prefix):
The result of this function should be passed to the Consumer The result of this function should be passed to the Consumer
constructor as the store parameter. constructor as the store parameter.
""" """
if not settings.DATABASES['default'].ENGINE:
db_engine = settings.DATABASES['default']['ENGINE']
if not db_engine:
return FileOpenIDStore(filestore_path) return FileOpenIDStore(filestore_path)
# get the suffix
db_engine = db_engine.split('.')[-1]
# Possible side-effect: create a database connection if one isn't # Possible side-effect: create a database connection if one isn't
# already open. # already open.
connection.cursor() connection.cursor()
...@@ -62,12 +67,12 @@ def getOpenIDStore(filestore_path, table_prefix): ...@@ -62,12 +67,12 @@ def getOpenIDStore(filestore_path, table_prefix):
} }
try: try:
s = types[settings.DATABASE_ENGINE](connection.connection, s = types[db_engine](connection.connection,
**tablenames) **tablenames)
except KeyError: except KeyError:
raise ImproperlyConfigured, \ raise ImproperlyConfigured, \
"Database engine %s not supported by OpenID library" % \ "Database engine %s not supported by OpenID library" % \
(settings.DATABASE_ENGINE,) (db_engine,)
try: try:
s.createTables() s.createTables()
......
...@@ -5,9 +5,8 @@ anyjson==0.3.1 ...@@ -5,9 +5,8 @@ anyjson==0.3.1
celery==2.3.3 celery==2.3.3
distribute==0.6.24 distribute==0.6.24
django-celery==2.3.3 django-celery==2.3.3
django-kombu==0.9.4
django-picklefield==0.1.9 django-picklefield==0.1.9
kombu==1.4.1 kombu==2.5.7
psycopg2==2.4.1 psycopg2==2.4.1
pyparsing==1.5.6 pyparsing==1.5.6
python-dateutil==1.5 python-dateutil==1.5
......
...@@ -85,7 +85,7 @@ INSTALLED_APPS = ( ...@@ -85,7 +85,7 @@ INSTALLED_APPS = (
'django.contrib.sites', 'django.contrib.sites',
## needed for queues ## needed for queues
'djcelery', 'djcelery',
'djkombu', 'kombu',
## needed for schema migration ## needed for schema migration
'south', 'south',
## HELIOS stuff ## HELIOS stuff
...@@ -188,8 +188,8 @@ logging.basicConfig( ...@@ -188,8 +188,8 @@ logging.basicConfig(
# set up django-celery # set up django-celery
import djcelery import djcelery
djcelery.setup_loader() djcelery.setup_loader()
BROKER_BACKEND = "djkombu.transport.DatabaseTransport" BROKER_BACKEND = "kombu.transport.django"
CELERY_RESULT_DBURI = DATABASES['default'] CELERY_RESULT_DBURI = DATABASES['default']
# for testing # for testing
CELERY_ALWAYS_EAGER = True #CELERY_ALWAYS_EAGER = True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment