瀏覽代碼

celery cmd: Don't use current_app if app already set

Ask Solem 12 年之前
父節點
當前提交
722478d6b1
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      celery/bin/base.py

+ 1 - 1
celery/bin/base.py

@@ -288,7 +288,7 @@ class Command(object):
             os.environ['CELERY_CONFIG_MODULE'] = config_module
         if app:
             self.app = self.find_app(app)
-        else:
+        elif self.app is None:
             self.app = self.get_app(loader=loader)
         if self.enable_config_from_cmdline:
             argv = self.process_cmdline_config(argv)