Browse Source

Documentation: Fix rSt errors

Ask Solem 16 years ago
parent
commit
8b04474d9c
6 changed files with 17 additions and 22 deletions
  1. 1 1
      celery/monitoring.py
  2. 3 7
      celery/pool.py
  3. 1 1
      celery/registry.py
  4. 6 5
      celery/result.py
  5. 2 4
      celery/task.py
  6. 4 4
      celery/worker.py

+ 1 - 1
celery/monitoring.py

@@ -163,7 +163,7 @@ class StatsCollector(object):
 
     def collect(self):
         """Collect any new statistics available since the last time
-        :method:`collect` was executed."""
+        :meth:`collect` was executed."""
         connection = DjangoAMQPConnection()
         consumer = StatsConsumer(connection=connection)
         it = consumer.iterqueue(infinite=False)

+ 3 - 7
celery/pool.py

@@ -136,11 +136,11 @@ class TaskPool(object):
 
         :option callbacks: List of callbacks to execute if the task was
             successful. Must have the function signature:
-                ``mycallback(result, meta)``
+            ``mycallback(result, meta)``
 
         :option errbacks: List of errbacks to execute if the task raised
             and exception. Must have the function signature:
-                ``myerrback(exc, meta)``.
+            ``myerrback(exc, meta)``.
 
         :option tid: The tid for this task (unqiue pool id).
 
@@ -184,11 +184,7 @@ class TaskPool(object):
         return processes_reaped
 
     def get_worker_pids(self):
-        """Returns the process id's of all the pool workers.
-
-        :rtype: list
-
-        """
+        """Returns the process id's of all the pool workers."""
         return [process.pid for process in self._pool._pool]
 
     def on_ready(self, ret_value, callbacks, errbacks, meta):

+ 1 - 1
celery/registry.py

@@ -57,7 +57,7 @@ class TaskRegistry(UserDict):
         """Unregister task by name.
 
         :param name: name of the task to unregister, or a
-        :class:`celery.task.Task` class with a valid ``name`` attribute.
+            :class:`celery.task.Task` class with a valid ``name`` attribute.
 
         :raises NotRegistered: if the task has not been registered.
 

+ 6 - 5
celery/result.py

@@ -144,12 +144,13 @@ class AsyncResult(BaseAsyncResult):
 class TaskSetResult(object):
     """Working with :class:`celery.task.TaskSet` results.
 
-    An instance of this class is returned by :meth:`celery.task.TaskSet.run()`.
-    It lets you inspect the status and return values of a taskset as a
-    single entity.
+    An instance of this class is returned by
+    :meth:`celery.task.TaskSet.run()`. It lets you inspect the status and
+    return values of the taskset as a single entity.
 
     :option taskset_id: see :attr:`taskset_id`.
-    :option subtasks see :attr:`subtasks`.
+    :option subtasks: see :attr:`subtasks`.
+
 
     .. attribute:: taskset_id
 
@@ -157,7 +158,7 @@ class TaskSetResult(object):
 
     .. attribute:: subtasks
 
-        A list of :class:`AsyncResult`` instances for all of the subtasks.
+        A list of :class:`AsyncResult` instances for all of the subtasks.
 
     """
 

+ 2 - 4
celery/task.py

@@ -159,9 +159,7 @@ class Task(object):
 
     .. attribute:: routing_key
 
-        Override the global default ``routing_key``[#f1]_ for this task.
-
-    .. [#f1] ``settings.CELERY_AMQP_PUBLISHER_ROUTING_KEY``
+        Override the global default ``routing_key`` for this task.
 
     .. attribute:: mandatory
 
@@ -193,7 +191,7 @@ class Task(object):
     .. attribute:: disable_error_emails
 
         Disable all error e-mails for this task (only applicable if
-        ``settings.SEND_CELERY_ERROR_EMAILS`` is on).
+        ``settings.SEND_CELERY_ERROR_EMAILS`` is on.)
 
     :raises NotImplementedError: if the :attr:`name` attribute is not set.
 

+ 4 - 4
celery/worker.py

@@ -284,10 +284,10 @@ class TaskWrapper(object):
 
 class PeriodicWorkController(threading.Thread):
     """A thread that continuously checks if there are
-    :class:`celery.task.PeriodicTask`s waiting for execution, and executes
-    them.
+    :class:`celery.task.PeriodicTask` tasks waiting for execution,
+    and executes them.
 
-    Example
+    Example:
 
         >>> PeriodicWorkController().start()
 
@@ -299,7 +299,7 @@ class PeriodicWorkController(threading.Thread):
         self._stopped = threading.Event()
 
     def run(self):
-        """Don't use :meth:`run`. use :meth:`start`."""
+        """Run when you use :meth:`Thread.start`"""
         while True:
             if self._shutdown.isSet():
                 break