Browse Source

Remote control doc improvements

Ask Solem 10 years ago
parent
commit
2bd839dbc4

+ 1 - 1
docs/getting-started/first-steps-with-celery.rst

@@ -379,7 +379,7 @@ for the task at runtime:
 
 .. code-block:: bash
 
-    $ celery control rate_limit tasks.add 10/m
+    $ celery -A tasks control rate_limit tasks.add 10/m
     worker@example.com: OK
         new rate limit set successfully
 

+ 1 - 1
docs/history/changelog-2.2.rst

@@ -371,7 +371,7 @@ Fixes
   objects with a broken ``__repr__`` does not crash the worker, or otherwise
   make errors hard to understand (Issue #298).
 
-* Remote control command ``active_queues``: did not account for queues added
+* Remote control command :control:`active_queues`: did not account for queues added
   at runtime.
 
     In addition the dictionary replied by this command now has a different

+ 12 - 8
docs/userguide/workers.rst

@@ -290,12 +290,16 @@ Of course, using the higher-level interface to set rate limits is much
 more convenient, but there are commands that can only be requested
 using :meth:`~@control.broadcast`.
 
+Commands
+========
+
 .. control:: revoke
 
-Revoking tasks
-==============
-pool support: all
-broker support: *amqp, redis*
+``revoke``: Revoking tasks
+--------------------------
+:pool support: all
+:broker support: *amqp, redis*
+:command: :program:`celery -A proj control revoke <task_id>`
 
 All worker nodes keeps a memory of revoked task ids, either in-memory or
 persistent on disk (see :ref:`worker-persistent-revokes`).
@@ -580,7 +584,7 @@ named "``foo``" you can use the :program:`celery control` program:
 
 .. code-block:: bash
 
-    $ celery control add_consumer foo
+    $ celery -A proj control add_consumer foo
     -> worker1.local: OK
         started consuming from u'foo'
 
@@ -589,7 +593,7 @@ If you want to specify a specific worker you can use the
 
 .. code-block:: bash
 
-    $ celery control add_consumer foo -d worker1.local
+    $ celery -A proj control add_consumer foo -d worker1.local
 
 The same can be accomplished dynamically using the :meth:`@control.add_consumer` method::
 
@@ -631,14 +635,14 @@ you can use the :program:`celery control` program:
 
 .. code-block:: bash
 
-    $ celery control cancel_consumer foo
+    $ celery -A proj control cancel_consumer foo
 
 The :option:`--destination` argument can be used to specify a worker, or a
 list of workers, to act on the command:
 
 .. code-block:: bash
 
-    $ celery control cancel_consumer foo -d worker1.local
+    $ celery -A proj control cancel_consumer foo -d worker1.local
 
 
 You can also cancel consumers programmatically using the

+ 5 - 5
docs/whatsnew-3.0.rst

@@ -457,7 +457,7 @@ New remote control commands
 These commands were previously experimental, but they have proven
 stable and is now documented as part of the offical API.
 
-- ``add_consumer``/``cancel_consumer``
+- :control:`add_consumer`/:control:`cancel_consumer`
 
     Tells workers to consume from a new queue, or cancel consuming from a
     queue.  This command has also been changed so that the worker remembers
@@ -486,7 +486,7 @@ stable and is now documented as part of the offical API.
         Remember that a control command without *destination* will be
         sent to **all workers**.
 
-- ``autoscale``
+- :control:`autoscale`
 
     Tells workers with `--autoscale` enabled to change autoscale
     max/min concurrency settings.
@@ -504,7 +504,7 @@ stable and is now documented as part of the offical API.
 
         $ celery control -d w1.example.com autoscale 10 5
 
-- ``pool_grow``/``pool_shrink``
+- :control:`pool_grow`/:control:`pool_shrink`
 
     Tells workers to add or remove pool processes.
 
@@ -523,8 +523,8 @@ stable and is now documented as part of the offical API.
         $ celery control -d w1.example.com pool_grow 2
         $ celery control -d w1.example.com pool_shrink 2
 
-- :program:`celery control` now supports ``rate_limit`` & ``time_limit``
-  commands.
+- :program:`celery control` now supports :control:`rate_limit` and
+  :control:`time_limit` commands.
 
     See ``celery control --help`` for details.
 

+ 4 - 3
docs/whatsnew-3.1.rst

@@ -76,7 +76,7 @@ so I cannot recommend them for production use.
 The next version of Celery 3.2 will focus on performance and removing
 rarely used parts of the library.  Work has also started on a new message
 protocol, supporting multiple languages and more.  The initial draft can
-be found :ref:`here <protov2draft>`.
+be found :ref:`here <message-protocol-task-v2`.
 
 This has probably been the hardest release I've worked on, so no
 introduction to this changelog would be complete without a massive
@@ -1212,8 +1212,9 @@ Fixes
 - Eventlet/gevent/solo/threads pools now properly handles :exc:`BaseException`
   errors raised by tasks.
 
-- Autoscale and ``pool_grow``/``pool_shrink`` remote control commands
-  will now also automatically increase and decrease the consumer prefetch count.
+- :control:`autoscale` and :control:`pool_grow`/:control:`pool_shrink` remote
+  control commands will now also automatically increase and decrease the
+  consumer prefetch count.
 
     Fix contributed by Daniel M. Taub.