From 258b62c6a2046e0a378ee4da2bd2390acf535990 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 1 May 2011 19:41:22 -0500 Subject: [PATCH] Register the models when using from_celery --- mediagoblin/celery_setup/from_celery.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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( -- 2.25.1