Ask Solem 15 years ago
parent
commit
245a5dfda0

+ 0 - 1
celery/bin/celeryd.py

@@ -273,7 +273,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)

+ 7 - 6
celery/loaders/__init__.py

@@ -17,17 +17,18 @@ 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.
+            # 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.

+ 7 - 7
celery/tests/test_buckets.py

@@ -1,13 +1,14 @@
-import sys
 import os
+import sys
 sys.path.insert(0, os.getcwd())
-import unittest
 import time
+import unittest
+from itertools import chain, izip
+
 from celery import buckets
-from celery.task.base import Task
-from celery.registry import TaskRegistry
 from celery.utils import gen_unique_id
-from itertools import chain, izip
+from celery.registry import TaskRegistry
+from celery.task.base import Task
 
 
 class MockJob(object):
@@ -89,7 +90,7 @@ class TestRateLimitString(unittest.TestCase):
         self.assertEquals(buckets.parse_ratelimit_string("10/h"),
                           10 / 60.0 / 60.0)
         self.assertEquals(buckets.parse_ratelimit_string("0xffec/s"), 0xffec)
-        self.assertEquals(buckets.parse_ratelimit_string("0xcda/m"), 
+        self.assertEquals(buckets.parse_ratelimit_string("0xcda/m"),
                           0xcda / 60.0)
         self.assertEquals(buckets.parse_ratelimit_string("0xF/h"),
                           0xf / 60.0 / 60.0)
@@ -186,7 +187,6 @@ class TestTaskBuckets(unittest.TestCase):
 
         self.assertTrue(got_ajobs > 2)
 
-
     def test_thorough__multiple_types(self):
         self.registry.register(TaskD)
         try:

+ 0 - 1
celery/tests/test_registry.py

@@ -18,7 +18,6 @@ class TestPeriodicTask(PeriodicTask):
         return True
 
 
-
 class TestTaskRegistry(unittest.TestCase):
 
     def assertRegisterUnregisterCls(self, r, task):

+ 0 - 1
celery/tests/test_worker_job.py

@@ -37,7 +37,6 @@ def mytask_no_kwargs(i):
     return i ** i
 
 
-
 @task_dec()
 def mytask_some_kwargs(i, logfile):
     some_kwargs_scratchpad["logfile"] = logfile

+ 0 - 1
celery/worker/controllers.py

@@ -113,4 +113,3 @@ class ScheduleController(BackgroundThread):
             "ScheduleController: Next wake-up estimated at %s seconds..." % (
                 delay))
         time.sleep(delay)
-