Ask Solem 14 年 前
コミット
5bd6f9a6bf

+ 0 - 2
celery/apps/worker.py

@@ -209,8 +209,6 @@ class Worker(object):
                                               hostname=self.hostname)
 
 
-
-
 def install_worker_int_handler(worker):
 
     def _stop(signum, frame):

+ 1 - 1
celery/bin/celeryd_detach.py

@@ -110,7 +110,7 @@ class PartialOptionParser(OptionParser):
     def _process_short_opts(self, rargs, values):
         arg = rargs[0]
         try:
-           OptionParser._process_short_opts(self, rargs, values)
+            OptionParser._process_short_opts(self, rargs, values)
         except BadOptionError:
             self.leftovers.append(arg)
             if rargs and not rargs[0][0] == "-":

+ 2 - 2
celery/bin/celeryd_multi.py

@@ -91,7 +91,7 @@ usage: %(prog_name)s start <node1 node2 nodeN|range> [celeryd options]
        %(prog_name)s show <n1 n2 nN|range> [celeryd options]
        %(prog_name)s get hostname <n1 n2 nN|range> [-qv] [celeryd options]
        %(prog_name)s names <n1 n2 nN|range>
-       %(prog_name)s expand template <n1 n2 nN|range> 
+       %(prog_name)s expand template <n1 n2 nN|range>
        %(prog_name)s help
 
 additional options (must appear after command name):
@@ -110,7 +110,7 @@ class MultiTool(object):
     retcode = 0  # Final exit code.
 
     def __init__(self):
-        self.commands = {"start": self.start, # XXX Deprecate
+        self.commands = {"start": self.start,
                          "show": self.show,
                          "stop": self.stop,
                          "restart": self.restart,

+ 2 - 3
celery/platforms.py

@@ -27,6 +27,7 @@ def get_fdmax(default=None):
         return default
     return fdmax
 
+
 def remove_pidfile(path):
     try:
         os.unlink(path)
@@ -86,7 +87,6 @@ def create_pidlock(pidfile):
     class LockFailed(Exception):
         pass
 
-
     class PIDFile(object):
 
         def __init__(self, path):
@@ -125,7 +125,6 @@ def create_pidlock(pidfile):
         def is_stale(self):
             return remove_pidfile_if_stale(self.path)
 
-
     pidlock = PIDFile(pidfile)
     if pidlock.is_locked() and not pidlock.is_stale():
         raise SystemExit(
@@ -181,6 +180,7 @@ class DaemonContext(object):
         if self._is_open:
             self._is_open = False
 
+
 def create_daemon_context(logfile=None, pidfile=None, **options):
     if not CAN_DETACH:
         raise RuntimeError(
@@ -211,7 +211,6 @@ def create_daemon_context(logfile=None, pidfile=None, **options):
     return context, context.close
 
 
-
 def parse_uid(uid):
     """Parse user id.
 

+ 5 - 4
celery/utils/timeutils.py

@@ -63,10 +63,11 @@ def remaining(start, ends_in, now=None, relative=True):
 
     :param start: Start :class:`~datetime.datetime`.
     :param ends_in: The end delta as a :class:`~datetime.timedelta`.
-    :keyword relative: If set to :const:`False`, the end time will be calculated
-        using :func:`delta_resolution` (i.e. rounded to the resolution
-          of ``ends_in``).
-    :keyword now: The current time, defaults to :func:`datetime.now`.
+    :keyword relative: If set to :const:`False`, the end time will be
+        calculated using :func:`delta_resolution` (i.e. rounded to the
+        resolution of ``ends_in``).
+    :keyword now: Function returning the current time and date,
+        defaults to :func:`datetime.now`.
 
     """
     now = now or datetime.now()