diff --git a/helios_auth/auth_systems/openid/util.py b/helios_auth/auth_systems/openid/util.py index 13cd063c0187ba0d338b13046e52cafdf86d95f8..75272ea2570f3d70d0e205d2f153f4be1a3a423a 100644 --- a/helios_auth/auth_systems/openid/util.py +++ b/helios_auth/auth_systems/openid/util.py @@ -41,9 +41,14 @@ def getOpenIDStore(filestore_path, table_prefix): The result of this function should be passed to the Consumer 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) + # get the suffix + db_engine = db_engine.split('.')[-1] + # Possible side-effect: create a database connection if one isn't # already open. connection.cursor() @@ -62,12 +67,12 @@ def getOpenIDStore(filestore_path, table_prefix): } try: - s = types[settings.DATABASE_ENGINE](connection.connection, + s = types[db_engine](connection.connection, **tablenames) except KeyError: raise ImproperlyConfigured, \ "Database engine %s not supported by OpenID library" % \ - (settings.DATABASE_ENGINE,) + (db_engine,) try: s.createTables() diff --git a/requirements.txt b/requirements.txt index 2387077ad67536aa2a905ab57f3811546ba46fac..50eb2a2cb3ba0f0c8587a38727390f916d6651a6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,9 +5,8 @@ anyjson==0.3.1 celery==2.3.3 distribute==0.6.24 django-celery==2.3.3 -django-kombu==0.9.4 django-picklefield==0.1.9 -kombu==1.4.1 +kombu==2.5.7 psycopg2==2.4.1 pyparsing==1.5.6 python-dateutil==1.5 diff --git a/settings.py b/settings.py index 7bc42aa7b243348ff19e1ac4a1ba586232f76fb4..1189078e3c85565079c2351ba70fffa21e183ffa 100644 --- a/settings.py +++ b/settings.py @@ -85,7 +85,7 @@ INSTALLED_APPS = ( 'django.contrib.sites', ## needed for queues 'djcelery', - 'djkombu', + 'kombu', ## needed for schema migration 'south', ## HELIOS stuff @@ -188,8 +188,8 @@ logging.basicConfig( # set up django-celery import djcelery djcelery.setup_loader() -BROKER_BACKEND = "djkombu.transport.DatabaseTransport" +BROKER_BACKEND = "kombu.transport.django" CELERY_RESULT_DBURI = DATABASES['default'] # for testing -CELERY_ALWAYS_EAGER = True +#CELERY_ALWAYS_EAGER = True