Moving celery setup to the right place
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 9 Aug 2013 19:15:18 +0000 (14:15 -0500)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:15 +0000 (15:30 -0700)
This commit sponsored by Jose Manuel Zueco Lazaro.  Thank you!

mediagoblin/gmg_commands/reprocess.py

index 62a6d428c94186fcbe74e54ca19ec1855991a1c2..2af888474627a98ef1172bded781575dc89c34ef 100644 (file)
@@ -249,10 +249,6 @@ def available(args):
 def run(args):
     ### OLD CODE, review
 
-    # Run eagerly unless explicetly set not to
-    if not args.celery:
-        os.environ['CELERY_ALWAYS_EAGER'] = 'true'
-
     _set_media_state(args)
     _set_media_type(args)
 
@@ -264,6 +260,10 @@ def run(args):
 
 
 def reprocess(args):
+    # Run eagerly unless explicetly set not to
+    if not args.celery:
+        os.environ['CELERY_ALWAYS_EAGER'] = 'true'
+
     commands_util.setup_app(args)
 
     if args.reprocess_subcommand == "run":