Explorar o código

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

Ask Solem %!s(int64=12) %!d(string=hai) anos
pai
achega
722478d6b1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)