Browse Source

Fixes rst bugs

Ask Solem 12 years ago
parent
commit
a6f167c23a
4 changed files with 10 additions and 12 deletions
  1. 2 2
      Changelog
  2. 7 8
      celery/contrib/migrate.py
  3. 0 1
      celery/tests/worker/test_mediator.py
  4. 1 1
      docs/userguide/monitoring.rst

+ 2 - 2
Changelog

@@ -131,8 +131,8 @@
 
 - New method names:
 
-    - ``Celery.default_connection()` ➠  :meth:`~@Celery.connection_or_acquire`.
-    - ``Celery.default_producer()`   ➠  :meth:`~@Celery.producer_or_acquire`.
+    - ``Celery.default_connection()`` ➠  :meth:`~@Celery.connection_or_acquire`.
+    - ``Celery.default_producer()``   ➠  :meth:`~@Celery.producer_or_acquire`.
 
     The old names still work for backward compatibility.
 

+ 7 - 8
celery/contrib/migrate.py

@@ -117,22 +117,19 @@ def move(predicate, connection=None, exchange=None, routing_key=None,
         source=None, app=None, callback=None, limit=None, transform=None,
         **kwargs):
     """Find tasks by filtering them and move the tasks to a new queue.
-    :param predicate: Predicate function used to filter messages to move.
-        Must accept the standard signature of ``(body, message)`` used
-        by Kombu consumer callbacks.  If the predicate wants the message
-        to be moved it should return the hostname of the worker to move it
-        to, otherwise it should return :const:`False`
-    :keyword queues: A list of queues to consume from, if not specified
-        it will consume from all configured task queues in ``CELERY_QUEUES``.
 
     :param predicate: Filter function used to decide which messages
         to move.  Must accept the standard signature of ``(body, message)``
         used by Kombu consumer callbacks. If the predicate wants the message
-        to be moved it must return either
+        to be moved it must return either:
+
             1) a tuple of ``(exchange, routing_key)``, or
+
             2) a :class:`~kombu.entity.Queue` instance, or
+
             3) any other true value which means the specified
                ``exchange`` and ``routing_key`` arguments will be used.
+
     :keyword connection: Custom connection to use.
     :keyword source: Optional list of source queues to use instead of the
         default (which is the queues in :setting:`CELERY_QUEUES`).
@@ -161,6 +158,8 @@ def move(predicate, connection=None, exchange=None, routing_key=None,
 
     or with a transform:
 
+    .. code-block:: python
+
         def transform(value):
             if isinstance(value, basestring):
                 return Queue(value, Exchange(value), value)

+ 0 - 1
celery/tests/worker/test_mediator.py

@@ -6,7 +6,6 @@ from Queue import Queue
 
 from mock import Mock, patch
 
-from celery.utils import uuid
 from celery.worker.mediator import Mediator
 from celery.worker.state import revoked as revoked_tasks
 from celery.tests.utils import Case

+ 1 - 1
docs/userguide/monitoring.rst

@@ -583,7 +583,7 @@ Task Events
 ~~~~~~~~~~~
 
 * ``task-sent(uuid, name, args, kwargs, retries, eta, expires,
-              queue, exchange, routing_key)``
+  queue, exchange, routing_key)``
 
    Sent when a task message is published and
    the :setting:`CELERY_SEND_TASK_SENT_EVENT` setting is enabled.