aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/init
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2012-02-27 21:55:02 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2012-02-27 21:55:02 +0100
commit34344f1d85be72741a9421a8a3af12ced35bbe35 (patch)
treed1dee55b3f624531a6f361c21715fdcd8040c562 /mediagoblin/init
parent6b38a38a91a72e24362a0f7760942958096b6fce (diff)
parenta9a63a686e934e3189179dcf01faad39a330a378 (diff)
downloadmediagoblin-34344f1d85be72741a9421a8a3af12ced35bbe35.tar.lz
mediagoblin-34344f1d85be72741a9421a8a3af12ced35bbe35.tar.xz
mediagoblin-34344f1d85be72741a9421a8a3af12ced35bbe35.zip
Merge remote-tracking branch 'cwebber/celerysql'
* cwebber/celerysql: Adjust unit tests to match new celery/kombu sqlalchemy setup "database" is not the sqlalchemy kombu transport... should be "sqlalchemy" Celery and kombu databases should also be .gitignore'd kombu-sqlalchemy a requirement in order for kombu sqlalchemy transport to work Move mediagoblin dbs out of user_dev for race condition directory-creation reasons. Give kombu its own db. Responding to Elrond "sqlite will lock all the time!" :) Apparently an absolute path is three slashes after sqlite:. Thx elrond. Should be all that's needed to switch celery/kombu settings to sqlalchemy
Diffstat (limited to 'mediagoblin/init')
-rw-r--r--mediagoblin/init/celery/__init__.py23
1 files changed, 3 insertions, 20 deletions
diff --git a/mediagoblin/init/celery/__init__.py b/mediagoblin/init/celery/__init__.py
index fb958909..6dcea239 100644
--- a/mediagoblin/init/celery/__init__.py
+++ b/mediagoblin/init/celery/__init__.py
@@ -47,30 +47,13 @@ def setup_celery_from_config(app_config, global_config,
celery_settings = {}
- # set up mongodb stuff
- celery_settings['CELERY_RESULT_BACKEND'] = 'mongodb'
- if 'BROKER_BACKEND' not in celery_settings:
- celery_settings['BROKER_BACKEND'] = 'mongodb'
-
- celery_mongo_settings = {}
-
- if 'db_host' in app_config:
- celery_mongo_settings['host'] = app_config['db_host']
- if celery_settings['BROKER_BACKEND'] == 'mongodb':
- celery_settings['BROKER_HOST'] = app_config['db_host']
- if 'db_port' in app_config:
- celery_mongo_settings['port'] = app_config['db_port']
- if celery_settings['BROKER_BACKEND'] == 'mongodb':
- celery_settings['BROKER_PORT'] = app_config['db_port']
- celery_mongo_settings['database'] = app_config['db_name']
-
- celery_settings['CELERY_MONGODB_BACKEND_SETTINGS'] = celery_mongo_settings
-
- # Add anything else
+ # Add all celery settings from config
for key, value in celery_conf.iteritems():
key = key.upper()
celery_settings[key] = value
+ # TODO: use default result stuff here if it exists
+
# add mandatory celery imports
celery_imports = celery_settings.setdefault('CELERY_IMPORTS', [])
celery_imports.extend(MANDATORY_CELERY_IMPORTS)