Sfoglia il codice sorgente

Fix rst syntax warnings.

Ask Solem 16 anni fa
parent
commit
20caa1bd2a
3 ha cambiato i file con 39 aggiunte e 17 eliminazioni
  1. 2 2
      celery/backends/__init__.py
  2. 1 3
      celery/conf.py
  3. 36 12
      celery/result.py

+ 2 - 2
celery/backends/__init__.py

@@ -28,7 +28,7 @@ def get_backend_cls(backend):
 """
 .. function:: get_default_backend_cls()
 
-    Get the backend class specified in :settings:`CELERY_BACKEND`.
+    Get the backend class specified in :setting:`CELERY_BACKEND`.
 
 """
 get_default_backend_cls = partial(get_backend_cls, CELERY_BACKEND)
@@ -38,7 +38,7 @@ get_default_backend_cls = partial(get_backend_cls, CELERY_BACKEND)
 .. function:: get_default_periodicstatus_backend_cls()
 
     Get the backend class specified in
-    :settings:`CELERY_PERIODIC_STATUS_BACKEND`.
+    :setting:`CELERY_PERIODIC_STATUS_BACKEND`.
 
 """
 get_default_periodicstatus_backend_cls = partial(get_backend_cls,

+ 1 - 3
celery/conf.py

@@ -119,9 +119,7 @@ receives all tasks. However, if the exchange type is ``topic``, you can
 route e.g. some tasks to one server, and others to the rest.
 See `Exchange types and the effect of bindings`_.
 
-.. _`Exchange types and the effect of bindings:
-    http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol
-    #Exchange_types_and_the_effect_of_bindings
+.. _`Exchange types and the effect of bindings`: http://bit.ly/wpamqpexchanges
 
 """
 AMQP_EXCHANGE_TYPE = getattr(settings, "CELERY_AMQP_EXCHANGE_TYPE",

+ 36 - 12
celery/result.py

@@ -144,7 +144,7 @@ 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().
+    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.
 
@@ -170,36 +170,60 @@ class TaskSetResult(object):
         self.subtasks = map(AsyncResult, self.subtask_ids)
 
     def itersubtasks(self):
-        """:returns: an iterator for iterating over the tasksets
-        :class:`AsyncResult` objects."""
+        """Taskset subtask iterator.
+        
+        :returns: an iterator for iterating over the tasksets
+            :class:`AsyncResult` objects.
+        
+        """
         return (subtask for subtask in self.subtasks)
 
     def successful(self):
-        """:returns: ``True`` if all of the tasks in the taskset finished
-        successfully (i.e. did not raise an exception)."""
+        """Was the taskset successful?
+        
+        :returns: ``True`` if all of the tasks in the taskset finished
+            successfully (i.e. did not raise an exception).
+        
+        """
         return all((subtask.successful()
                         for subtask in self.itersubtasks()))
 
     def failed(self):
-        """:returns: ``True`` if any of the tasks in the taskset failed.
-        (i.e., raised an exception)"""
+        """Did the taskset fail?
+        
+        :returns: ``True`` if any of the tasks in the taskset failed.
+            (i.e., raised an exception)
+            
+        """
         return any((not subtask.successful()
                         for subtask in self.itersubtasks()))
 
     def waiting(self):
-        """:returns: ``True`` if any of the tasks in the taskset is still
-        waiting for execution."""
+        """Is the taskset waiting?
+        
+        :returns: ``True`` if any of the tasks in the taskset is still
+            waiting for execution.
+            
+        """
         return any((not subtask.ready()
                         for subtask in self.itersubtasks()))
 
     def ready(self):
-        """:returns: ``True`` if all of the tasks in the taskset has been
-        executed."""
+        """Is the task readyu?
+        
+        :returns: ``True`` if all of the tasks in the taskset has been
+            executed.
+
+        """
         return all((subtask.ready()
                         for subtask in self.itersubtasks()))
 
     def completed_count(self):
-        """:returns: the number of tasks completed."""
+        """Task completion count.
+        
+        :returns: the number of tasks completed.
+        
+        """
         return sum(imap(int, (subtask.successful()
                                 for subtask in self.itersubtasks())))