Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Oct 28, 2011
1 parent b4b239d commit e12cb15
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
15 changes: 4 additions & 11 deletions FAQ
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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?
Expand Down
3 changes: 2 additions & 1 deletion celery/bin/celeryctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions celery/tests/test_task/test_task_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def test_revoked(self):
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
Expand Down
20 changes: 12 additions & 8 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions docs/userguide/monitoring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
::
Expand Down
14 changes: 11 additions & 3 deletions docs/userguide/optimizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/userguide/workers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit e12cb15

Please sign in to comment.