aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/celery_setup
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-05-01 19:41:22 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-05-01 19:41:22 -0500
commit258b62c6a2046e0a378ee4da2bd2390acf535990 (patch)
treed1712b432eab18e9743b404fad97e0d819f11f89 /mediagoblin/celery_setup
parente495ec48f42f3a41e4bbefba58b61c046940ef6b (diff)
downloadmediagoblin-258b62c6a2046e0a378ee4da2bd2390acf535990.tar.lz
mediagoblin-258b62c6a2046e0a378ee4da2bd2390acf535990.tar.xz
mediagoblin-258b62c6a2046e0a378ee4da2bd2390acf535990.zip
Register the models when using from_celery
Diffstat (limited to 'mediagoblin/celery_setup')
-rw-r--r--mediagoblin/celery_setup/from_celery.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/mediagoblin/celery_setup/from_celery.py b/mediagoblin/celery_setup/from_celery.py
index 851cbaa1..9bd7fe07 100644
--- a/mediagoblin/celery_setup/from_celery.py
+++ b/mediagoblin/celery_setup/from_celery.py
@@ -19,7 +19,7 @@ import os
import mongokit
from paste.deploy.loadwsgi import NicerConfigParser
-from mediagoblin import storage
+from mediagoblin import storage, models
from mediagoblin.celery_setup import setup_celery_from_config
from mediagoblin.globals import setup_globals
@@ -69,6 +69,7 @@ def setup_self(setup_globals_func=setup_globals):
connection = mongokit.Connection(
mgoblin_section.get('db_host'), mgoblin_section.get('db_port'))
db = connection[mgoblin_section.get('db_name', 'mediagoblin')]
+ models.register_models(connection)
# Set up the storage systems.
public_store = storage.storage_system_from_paste_config(