Actually make use of CELERY_SETUP in from_tests.py
authorChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 30 Jun 2011 21:57:55 +0000 (16:57 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 30 Jun 2011 21:57:55 +0000 (16:57 -0500)
mediagoblin/celery_setup/from_tests.py

index 0f305df28cf9ed8d915fb9292fbb6fa535a59260..779ecd652472126c1ccd7d1679e39c63dfaa98dd 100644 (file)
@@ -25,6 +25,9 @@ CELERY_SETUP = False
 
 
 if os.environ.get('CELERY_CONFIG_MODULE') == OUR_MODULENAME:
-    setup_self(check_environ_for_conf=False, module_name=OUR_MODULENAME,
-               default_conf_file=TEST_APP_CONFIG)
-    CELERY_SETUP = True
+    if CELERY_SETUP:
+        pass
+    else:
+        setup_self(check_environ_for_conf=False, module_name=OUR_MODULENAME,
+                   default_conf_file=TEST_APP_CONFIG)
+        CELERY_SETUP = True