Ask Solem 15 سال پیش
والد
کامیت
dc7a7141c0
4فایلهای تغییر یافته به همراه10 افزوده شده و 12 حذف شده
  1. 0 1
      celery/bin/celeryd.py
  2. 9 9
      celery/loaders/__init__.py
  3. 1 1
      celery/patch.py
  4. 0 1
      contrib/test_runner.py

+ 0 - 1
celery/bin/celeryd.py

@@ -264,7 +264,6 @@ def install_worker_restart_handler(worker):
     platform.install_signal_handler("SIGHUP", restart_worker_sig_handler)
 
 
-
 def parse_options(arguments):
     """Parse the available options to ``celeryd``."""
     parser = optparse.OptionParser(option_list=OPTION_LIST)

+ 9 - 9
celery/loaders/__init__.py

@@ -15,20 +15,20 @@ if settings.configured:
     Loader = DjangoLoader
 else:
     try:
-        # A settings module may be defined, but Django didn't attempt to 
+        # A settings module may be defined, but Django didn't attempt to
         # load it yet. As an alternative to calling the private _setup(),
         # we could also check whether DJANGO_SETTINGS_MODULE is set.
-        settings._setup() 
+        settings._setup()
     except ImportError:
         if not callable(getattr(os, "fork", None)):
             # Platform doesn't support fork()
-            # XXX On systems without fork, multiprocessing seems to be launching
-            # the processes in some other way which does not copy the memory
-            # of the parent process. This means that any configured env might
-            # be lost. This is a hack to make it work on Windows.
-            # A better way might be to use os.environ to set the currently
-            # used configuration method so to propogate it to the "child"
-            # processes. But this has to be experimented with.
+            # XXX On systems without fork, multiprocessing seems to be
+            # launching the processes in some other way which does not
+            # copy the memory of the parent process. This means that any
+            # configured env might be lost. This is a hack to make it work
+            # on Windows. A better way might be to use os.environ to set
+            # the currently used configuration method so to propogate it
+            # to the "child" processes. But this has to be experimented with.
             # [asksol/heyman]
             try:
                 settings_mod = os.environ.get("DJANGO_SETTINGS_MODULE",

+ 1 - 1
celery/patch.py

@@ -22,8 +22,8 @@ def _check_logger_class():
     finally:
         logging._releaseLock()
 
+
 def monkeypatch():
     major, minor = sys.version_info[:2]
     if major == 2 and minor < 6: # python < 2.6
         _check_logger_class()
-

+ 0 - 1
contrib/test_runner.py

@@ -8,4 +8,3 @@ Custom test runner to allow testing of celery .delay() tasks.
 def run_tests(test_labels, *args, **kwargs):
     settings.CELERY_ALWAYS_EAGER = True
     return run_tests_orig(test_labels, *args, **kwargs)
-