Browse Source

Improve docs

Ask Solem 13 years ago
parent
commit
e12cb157b3

+ 2 - 2
Changelog

@@ -239,7 +239,7 @@ News
 
 * The :setting:`CELERYBEAT_MAX_LOOP_INTERVAL` setting was not respected.
 
-* ``inspect.registered_tasks`` renamed to ``inspect.tasks`` for naming
+* ``inspect.registered_tasks`` renamed to ``inspect.registered`` for naming
   consistency.
 
     The previous name is still available as an alias.
@@ -317,7 +317,7 @@ News
     If you'd like to contribute to Celery you should read this
     guide: http://ask.github.com/celery/contributing.html
 
-    We are looking for contributors of all skill levels, so don't
+    We are looking for contributors at all skill levels, so don't
     hesitate!
 
 * Now depends on Kombu 1.3.1

+ 4 - 11
FAQ

@@ -405,6 +405,10 @@ When running with the AMQP result backend, every task result will be sent
 as a message. If you don't collect these results, they will build up and
 RabbitMQ will eventually run out of memory.
 
+Results expire after 1 day by default.  It may be a good idea
+to lower this value by configuring the :setting:`CELERY_TASK_RESULT_EXPIRES`
+setting.
+
 If you don't use the results for a task, make sure you set the
 `ignore_result` option:
 
@@ -417,17 +421,6 @@ If you don't use the results for a task, make sure you set the
     class MyTask(Task):
         ignore_result = True
 
-Results can also be disabled globally using the
-:setting:`CELERY_IGNORE_RESULT` setting.
-
-.. note::
-
-    Celery version 2.1 added support for automatic expiration of
-    AMQP result backend results.
-
-    To use this you need to run RabbitMQ 2.1 or higher and enable
-    the :setting:`CELERY_AMQP_TASK_RESULT_EXPIRES` setting.
-
 .. _faq-use-celery-with-stomp:
 
 Can I use Celery with ActiveMQ/STOMP?

+ 2 - 1
celery/bin/celeryctl.py

@@ -221,7 +221,8 @@ class inspect(Command):
                "reserved": 1.0,
                "stats": 1.0,
                "revoked": 1.0,
-               "registered_tasks": 1.0,
+               "registered_tasks": 1.0,  # alias to registered
+               "registered": 1.0,
                "enable_events": 1.0,
                "disable_events": 1.0,
                "ping": 0.2,

+ 2 - 2
celery/tests/test_task/test_task_control.py

@@ -82,8 +82,8 @@ class test_inspect(unittest.TestCase):
         self.assertIn("dump_revoked", MockMailbox.sent)
 
     @with_mock_broadcast
-    def test_registered_tasks(self):
-        self.i.registered_tasks()
+    def test_asks(self):
+        self.i.tasks()
         self.assertIn("dump_tasks", MockMailbox.sent)
 
     @with_mock_broadcast

+ 12 - 8
docs/configuration.rst

@@ -127,8 +127,9 @@ Can be one of the following:
 CELERY_RESULT_SERIALIZER
 ~~~~~~~~~~~~~~~~~~~~~~~~
 
-Result message serialization format.  Default is `"pickle"`. See
-:ref:`executing-serializers`.
+Result serialization format.  Default is `"pickle"`. See
+:ref:`executing-serializers` for information about supported
+serialization formats.
 
 .. _conf-database-result-backend:
 
@@ -533,17 +534,20 @@ built-in transports: ``amqplib``, ``pika``, ``redis``, ``beanstalk``,
 
 .. setting:: BROKER_URL
 
-Default broker URL.  This must be an URL in the format of::
+BROKER_URL
+~~~~~~~~~~
+
+Default broker URL.  This must be an URL in the form of::
 
     transport://userid:password@hostname:port/virtual_host
 
+Only the scheme part (``transport://``) is required, the rest
+is optional, and defaults to the specific transports default values.
+
 If this setting is defined it will override a subset of the
-other ``BROKER`` options, these options are :setting:`BROKER_HOST`,
+other ``BROKER`` options. These options are :setting:`BROKER_HOST`,
 :setting:`BROKER_USER`, :setting:`BROKER_PASSWORD`, :setting:`BROKER_PORT`,
-and :setting:`BROKER_VHOST`.  The query part of the URL can also be used
-to set options, e.g.::
-
-    amqp://localhost/myvhost?ssl=1
+and :setting:`BROKER_VHOST`.
 
 See the Kombu documentation for more information about broker URLs.
 

+ 2 - 2
docs/userguide/monitoring.rst

@@ -93,10 +93,10 @@ Commands
 
         $ celeryctl inspect revoked
 
-* **inspect registered_tasks**: List registered tasks
+* **inspect registered**: List registered tasks
     ::
 
-        $ celeryctl inspect registered_tasks
+        $ celeryctl inspect registered
 
 * **inspect stats**: Show worker statistics
     ::

+ 11 - 3
docs/userguide/optimizing.rst

@@ -47,10 +47,10 @@ like adding new worker nodes, or revoking unnecessary tasks.
 .. _`The back of the envelope`:
     http://books.google.com/books?id=kse_7qbWbjsC&pg=PA67
 
-.. _optimizing-worker-settings:
+.. _optimizing-general-settings:
 
-Worker Settings
-===============
+General Settings
+================
 
 .. _optimizing-connection-pools:
 
@@ -60,8 +60,16 @@ Broker Connection Pools
 You should enable the :setting:`BROKER_POOL_LIMIT` setting,
 as this will drastically improve overall performance.
 
+The value should be based on how many threads will use
+connections at the same time.
+
 This setting will be enabled by default in version 3.0.
 
+.. _optimizing-worker-settings:
+
+Worker Settings
+===============
+
 .. _optimizing-prefetch-limit:
 
 Prefetch Limits

+ 2 - 2
docs/userguide/workers.rst

@@ -411,9 +411,9 @@ Dump of registered tasks
 ------------------------
 
 You can get a list of tasks registered in the worker using the
-:meth:`~celery.task.control.inspect.registered_tasks`::
+:meth:`~celery.task.control.inspect.registered`::
 
-    >>> i.registered_tasks()
+    >>> i.registered()
     [{'worker1.example.com': ['celery.delete_expired_task_meta',
                               'celery.execute_remote',
                               'celery.map_async',