Ver código fonte

Added table-of-contents to documentation pages.

Ask Solem 14 anos atrás
pai
commit
f107b480bd
90 arquivos alterados com 311 adições e 68 exclusões
  1. 3 0
      Changelog
  2. 3 0
      FAQ
  3. 5 4
      celery/task/sets.py
  4. 1 0
      celery/worker/control/registry.py
  5. 3 0
      docs/configuration.rst
  6. 3 0
      docs/cookbook/daemonizing.rst
  7. 5 2
      docs/cookbook/tasks.rst
  8. 3 0
      docs/getting-started/broker-installation.rst
  9. 3 0
      docs/getting-started/first-steps-with-celery.rst
  10. 23 10
      docs/getting-started/periodic-tasks.rst
  11. 4 0
      docs/getting-started/resources.rst
  12. 3 0
      docs/includes/introduction.txt
  13. 9 5
      docs/internals/deprecation.rst
  14. 12 3
      docs/internals/events.rst
  15. 3 0
      docs/internals/moduleindex.rst
  16. 34 26
      docs/internals/protocol.rst
  17. 2 0
      docs/internals/reference/celery.backends.amqp.rst
  18. 2 0
      docs/internals/reference/celery.backends.base.rst
  19. 2 0
      docs/internals/reference/celery.backends.database.rst
  20. 2 0
      docs/internals/reference/celery.backends.mongodb.rst
  21. 2 0
      docs/internals/reference/celery.backends.pyredis.rst
  22. 2 0
      docs/internals/reference/celery.backends.rst
  23. 2 0
      docs/internals/reference/celery.backends.tyrant.rst
  24. 2 0
      docs/internals/reference/celery.beat.rst
  25. 2 0
      docs/internals/reference/celery.concurrency.processes.pool.rst
  26. 2 0
      docs/internals/reference/celery.concurrency.processes.rst
  27. 2 0
      docs/internals/reference/celery.concurrency.threads.rst
  28. 2 0
      docs/internals/reference/celery.datastructures.rst
  29. 2 0
      docs/internals/reference/celery.db.models.rst
  30. 2 0
      docs/internals/reference/celery.db.session.rst
  31. 2 0
      docs/internals/reference/celery.execute.trace.rst
  32. 2 0
      docs/internals/reference/celery.log.rst
  33. 2 0
      docs/internals/reference/celery.platform.rst
  34. 2 0
      docs/internals/reference/celery.routes.rst
  35. 2 0
      docs/internals/reference/celery.serialization.rst
  36. 2 0
      docs/internals/reference/celery.utils.compat.rst
  37. 2 0
      docs/internals/reference/celery.utils.dispatch.rst
  38. 2 0
      docs/internals/reference/celery.utils.dispatch.saferef.rst
  39. 2 0
      docs/internals/reference/celery.utils.dispatch.signal.rst
  40. 2 0
      docs/internals/reference/celery.utils.functional.rst
  41. 2 0
      docs/internals/reference/celery.utils.info.rst
  42. 2 0
      docs/internals/reference/celery.utils.mail.rst
  43. 2 0
      docs/internals/reference/celery.utils.patch.rst
  44. 2 0
      docs/internals/reference/celery.utils.rst
  45. 2 0
      docs/internals/reference/celery.utils.timeutils.rst
  46. 2 0
      docs/internals/reference/celery.worker.buckets.rst
  47. 3 0
      docs/internals/reference/celery.worker.control.builtins.rst
  48. 2 0
      docs/internals/reference/celery.worker.control.registry.rst
  49. 2 0
      docs/internals/reference/celery.worker.control.rst
  50. 2 0
      docs/internals/reference/celery.worker.controllers.rst
  51. 2 0
      docs/internals/reference/celery.worker.heartbeat.rst
  52. 2 0
      docs/internals/reference/celery.worker.job.rst
  53. 2 0
      docs/internals/reference/celery.worker.listener.rst
  54. 2 0
      docs/internals/reference/celery.worker.rst
  55. 2 0
      docs/internals/reference/celery.worker.scheduler.rst
  56. 5 3
      docs/internals/worker.rst
  57. 2 0
      docs/reference/celery.bin.camqadm.rst
  58. 2 0
      docs/reference/celery.bin.celerybeat.rst
  59. 2 0
      docs/reference/celery.bin.celeryd.rst
  60. 2 0
      docs/reference/celery.bin.celeryd_multi.rst
  61. 2 0
      docs/reference/celery.bin.celeryev.rst
  62. 4 0
      docs/reference/celery.conf.rst
  63. 7 4
      docs/reference/celery.contrib.abortable.rst
  64. 2 0
      docs/reference/celery.decorators.rst
  65. 2 0
      docs/reference/celery.events.rst
  66. 2 0
      docs/reference/celery.events.state.rst
  67. 2 0
      docs/reference/celery.exceptions.rst
  68. 2 0
      docs/reference/celery.execute.rst
  69. 2 0
      docs/reference/celery.loaders.base.rst
  70. 2 0
      docs/reference/celery.loaders.default.rst
  71. 2 0
      docs/reference/celery.loaders.rst
  72. 2 0
      docs/reference/celery.messaging.rst
  73. 2 0
      docs/reference/celery.registry.rst
  74. 2 0
      docs/reference/celery.result.rst
  75. 4 0
      docs/reference/celery.signals.rst
  76. 2 0
      docs/reference/celery.states.rst
  77. 2 0
      docs/reference/celery.task.base.rst
  78. 2 0
      docs/reference/celery.task.builtins.rst
  79. 2 0
      docs/reference/celery.task.control.rst
  80. 2 0
      docs/reference/celery.task.http.rst
  81. 2 0
      docs/reference/celery.task.rst
  82. 2 0
      docs/reference/celery.task.schedules.rst
  83. 6 3
      docs/tutorials/clickcounter.rst
  84. 8 1
      docs/tutorials/external.rst
  85. 3 0
      docs/tutorials/otherqueues.rst
  86. 11 5
      docs/userguide/executing.rst
  87. 12 2
      docs/userguide/remote-tasks.rst
  88. 3 0
      docs/userguide/routing.rst
  89. 3 0
      docs/userguide/tasks.rst
  90. 3 0
      docs/userguide/workers.rst

+ 3 - 0
Changelog

@@ -2,6 +2,9 @@
  Change history
 ================
 
+.. contents::
+    :local:
+
 1.2.0 [xxxx-xx-xx xx:xx x.x xxxx]
 =================================
 

+ 3 - 0
FAQ

@@ -2,6 +2,9 @@
  Frequently Asked Questions
 ============================
 
+.. contents::
+    :local:
+
 General
 =======
 

+ 5 - 4
celery/task/sets.py

@@ -40,13 +40,13 @@ class TaskSet(UserList):
     """A task containing several subtasks, making it possible
     to track how many, or when all of the tasks has been completed.
 
-    :param tasks: A list of :class:`subtask`s.
+    :param tasks: A list of :class:`subtask` instances.
 
     .. attribute:: total
 
         Total number of subtasks in this task set.
 
-    Example
+    Example::
 
         >>> from djangofeeds.tasks import RefreshFeedTask
         >>> from celery.task.sets import TaskSet, subtask
@@ -80,7 +80,7 @@ class TaskSet(UserList):
             connect_timeout=conf.BROKER_CONNECTION_TIMEOUT):
         """Run all tasks in the taskset.
 
-        :returns: A :class:`celery.result.TaskSetResult` instance.
+        Returns a :class:`celery.result.TaskSetResult` instance.
 
         Example
 
@@ -111,7 +111,8 @@ class TaskSet(UserList):
             return self.apply()
 
         taskset_id = gen_unique_id()
-        conn = connection or establish_connection(connect_timeout=connect_timeout)
+        conn = connection or establish_connection(
+                                    connect_timeout=connect_timeout)
         publisher = TaskPublisher(connection=conn)
         try:
             results = [task.apply_async(taskset_id, publisher)

+ 1 - 0
celery/worker/control/registry.py

@@ -12,6 +12,7 @@ class Panel(UserDict):
     @classmethod
     def register(cls, method, name=None):
         cls.data[name or method.__name__] = method
+        return method
 
     @classmethod
     def unregister(cls, name_or_method):

+ 3 - 0
docs/configuration.rst

@@ -7,6 +7,9 @@ This document describes the configuration options available.
 If you're using the default loader, you must create the ``celeryconfig.py``
 module and make sure it is available on the Python path.
 
+.. contents::
+    :local:
+
 Example configuration file
 ==========================
 

+ 3 - 0
docs/cookbook/daemonizing.rst

@@ -5,6 +5,9 @@
 Celery does not daemonize itself, please use one of the following
 daemonization tools.
 
+.. contents::
+    :local:
+
 
 start-stop-daemon
 =================

+ 5 - 2
docs/cookbook/tasks.rst

@@ -2,9 +2,12 @@
  Creating Tasks
 ================
 
+.. contents::
+    :local:
+
 
 Ensuring a task is only executed one at a time
-----------------------------------------------
+==============================================
 
 You can accomplish this by using a lock.
 
@@ -57,4 +60,4 @@ The cache key expires after some time in case something unexpected happens
             logger.debug(
                 "Feed %s is already being imported by another worker" % (
                     feed_url))
-            return
+            return

+ 3 - 0
docs/getting-started/broker-installation.rst

@@ -2,6 +2,9 @@
  Broker Installation
 =====================
 
+.. contents::
+    :local:
+
 Installing RabbitMQ
 ===================
 

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

@@ -2,6 +2,9 @@
  First steps with Celery
 ========================
 
+.. contents::
+    :local:
+
 Creating a simple task
 ======================
 

+ 23 - 10
docs/getting-started/periodic-tasks.rst

@@ -2,7 +2,16 @@
  Periodic Tasks
 ================
 
-You can schedule tasks to run at intervals like ``cron``.
+.. contents::
+    :local:
+
+Introduction
+============
+
+The :mod:`~celery.bin.celerybeat` service enables you to schedule tasks to
+run at intervals.
+
+Periodic tasks are defined as special task classes.
 Here's an example of a periodic task:
 
 .. code-block:: python
@@ -11,13 +20,15 @@ Here's an example of a periodic task:
     from datetime import timedelta
 
     @periodic_task(run_every=timedelta(seconds=30))
-    def every_30_seconds(**kwargs):
-        logger = self.get_logger(**kwargs)
-        logger.info("Running periodic task!")
+    def every_30_seconds():
+        print("Running periodic task!")
 
-If you want a little more control over when the task is executed, for example,
-a particular time of day or day of the week, you can use the ``crontab`` schedule
-type:
+Crontab-like schedules
+======================
+
+If you want a little more control over when the task is executed, for
+example, a particular time of day or day of the week, you can use
+the ``crontab`` schedule type:
 
 .. code-block:: python
 
@@ -25,9 +36,8 @@ type:
     from celery.decorators import periodic_task
 
     @periodic_task(run_every=crontab(hour=7, minute=30, day_of_week=1))
-    def every_monday_morning(**kwargs):
-        logger = self.get_logger(**kwargs)
-        logger.info("Execute every Monday at 7:30AM.")
+    def every_monday_morning():
+        print("Execute every Monday at 7:30AM.")
 
 The syntax of these crontab expressions is very flexible.  Some examples:
 
@@ -71,6 +81,9 @@ The syntax of these crontab expressions is very flexible.  Some examples:
 |                                     | every hour during office hours (8am-5pm).  |
 +-------------------------------------+--------------------------------------------+
 
+Starting celerybeat
+===================
+
 If you want to use periodic tasks you need to start the ``celerybeat``
 service. You have to make sure only one instance of this server is running at
 any time, or else you will end up with multiple executions of the same task.

+ 4 - 0
docs/getting-started/resources.rst

@@ -2,4 +2,8 @@
  Resources
 ===========
 
+.. contents::
+    :local:
+    :depth: 2
+
 .. include:: ../includes/resources.txt

+ 3 - 0
docs/includes/introduction.txt

@@ -34,6 +34,9 @@ via the `django-celery`_ package.
 .. _`operate with other languages using webhooks`:
     http://ask.github.com/celery/userguide/remote-tasks.html
 
+.. contents::
+    :local:
+
 Overview
 ========
 

+ 9 - 5
docs/internals/deprecation.rst

@@ -2,9 +2,13 @@
  Celery Deprecation Timeline
 =============================
 
-* 1.2
+.. contents::
+    :local:
 
-  * The following settings will be removed:
+Removals for version 1.2
+============================
+
+* The following settings will be removed:
 
     =====================================  =====================================
     **Setting name**                       **Replace with**
@@ -17,12 +21,12 @@
     ``CELERY_AMQP_PUBLISHER_ROUTING_KEY``  ``CELERY_DEFAULT_ROUTING_KEY``
     =====================================  =====================================
 
-  * ``CELERY_LOADER`` definitions without class name.
+* ``CELERY_LOADER`` definitions without class name.
 
     E.g. ``celery.loaders.default``, needs to include the class name:
     ``celery.loaders.default.Loader``.
 
-  * :meth:`TaskSet.run`. Use :meth:`celery.task.base.TaskSet.apply_async`
+* :meth:`TaskSet.run`. Use :meth:`celery.task.base.TaskSet.apply_async`
     instead.
 
-  * The module :mod:`celery.task.rest`; use :mod:`celery.task.http` instead.
+* The module :mod:`celery.task.rest`; use :mod:`celery.task.http` instead.

+ 12 - 3
docs/internals/events.rst

@@ -5,14 +5,18 @@
 This is the list of events sent by the worker.
 The monitor uses these to visualize the state of the cluster.
 
+.. contents::
+    :local:
+
+
 Task Events
------------
+===========
 
 * task-received(uuid, name, args, kwargs, retries, eta, hostname, timestamp)
 
     Sent when the worker receives a task.
 
-* task-accepted(uuid, hostname, timestamp)
+* task-started(uuid, hostname, timestamp)
 
     Sent just before the worker executes the task.
 
@@ -27,13 +31,18 @@ Task Events
 
     Sent if the execution of the task failed.
 
+* task-revoked(uuid)
+
+    Sent if the task has been revoked (Note that this is likely
+    to be sent by more than one worker)
+
 * task-retried(uuid, exception, traceback, hostname, delay, timestamp)
 
     Sent if the task failed, but will be retried in the future.
     (**NOT IMPLEMENTED**)
 
 Worker Events
--------------
+=============
 
 * worker-online(hostname, timestamp)
 

+ 3 - 0
docs/internals/moduleindex.rst

@@ -2,6 +2,9 @@
  Module Index
 ==============
 
+.. contents::
+    :local:
+
 Worker
 ======
 

+ 34 - 26
docs/internals/protocol.rst

@@ -2,45 +2,53 @@
  Task Message Protocol
 =======================
 
-    * task
-        ``string``
+.. contents::
+    :local:
 
-        Name of the task. **required**
+Message format
+==============
 
-    * id
-        ``string``
+* task
+    ``string``
 
-        Unique id of the task (UUID). **required**
+    Name of the task. **required**
 
-    * args
-        ``list``
+* id
+    ``string``
 
-        List of arguments. Will be an empty list if not provided.
+    Unique id of the task (UUID). **required**
 
-    * kwargs
-        ``dictionary``
+* args
+    ``list``
 
-        Dictionary of keyword arguments. Will be an empty dictionary if not
-        provided.
+    List of arguments. Will be an empty list if not provided.
 
-    * retries
-        ``int``
+* kwargs
+    ``dictionary``
 
-        Current number of times this task has been retried.
-        Defaults to ``0`` if not specified.
+    Dictionary of keyword arguments. Will be an empty dictionary if not
+    provided.
 
-    * eta
-        ``string`` (ISO 8601)
+* retries
+    ``int``
 
-        Estimated time of arrival. This is the date and time in ISO 8601
-        format. If not provided the message is not scheduled, but will be
-        executed asap.
+    Current number of times this task has been retried.
+    Defaults to ``0`` if not specified.
 
-Example
-=======
+* eta
+    ``string`` (ISO 8601)
+
+    Estimated time of arrival. This is the date and time in ISO 8601
+    format. If not provided the message is not scheduled, but will be
+    executed asap.
+
+Example message
+===============
 
 This is an example invocation of the ``celery.task.PingTask`` task in JSON
-format::
+format:
+
+.. code-block:: javascript
 
     {"task": "celery.task.PingTask",
      "args": [],
@@ -48,7 +56,6 @@ format::
      "retries": 0,
      "eta": "2009-11-17T12:30:56.527191"}
 
-
 Serialization
 =============
 
@@ -63,4 +70,5 @@ The MIME-types supported by default are shown in the following table.
     json            application/json
     yaml            application/x-yaml
     pickle          application/x-python-serialize
+    msgpack         application/x-msgpack
     =============== =================================

+ 2 - 0
docs/internals/reference/celery.backends.amqp.rst

@@ -2,6 +2,8 @@
 Backend: AMQP - celery.backends.amqp
 =======================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends.amqp
 
 .. automodule:: celery.backends.amqp

+ 2 - 0
docs/internals/reference/celery.backends.base.rst

@@ -2,6 +2,8 @@
 Backend: Base - celery.backends.base
 =====================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends.base
 
 .. automodule:: celery.backends.base

+ 2 - 0
docs/internals/reference/celery.backends.database.rst

@@ -2,6 +2,8 @@
  Backend: SQLAlchemy Database - celery.backends.database
 =========================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends.database
 
 .. automodule:: celery.backends.database

+ 2 - 0
docs/internals/reference/celery.backends.mongodb.rst

@@ -2,6 +2,8 @@
  Backend: MongoDB - celery.backends.mongodb
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends.mongodb
 
 .. automodule:: celery.backends.mongodb

+ 2 - 0
docs/internals/reference/celery.backends.pyredis.rst

@@ -2,6 +2,8 @@
  Backend: Redis - celery.backends.pyredis
 ==========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends.pyredis
 
 .. automodule:: celery.backends.pyredis

+ 2 - 0
docs/internals/reference/celery.backends.rst

@@ -2,6 +2,8 @@
 Backends - celery.backends
 ===========================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends
 
 .. automodule:: celery.backends

+ 2 - 0
docs/internals/reference/celery.backends.tyrant.rst

@@ -2,6 +2,8 @@
 Backend: Tokyo Tyrant - celery.backends.tyrant
 ===============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.backends.tyrant
 
 .. automodule:: celery.backends.tyrant

+ 2 - 0
docs/internals/reference/celery.beat.rst

@@ -2,6 +2,8 @@
 Clock Service - celery.beat
 ========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.beat
 
 .. automodule:: celery.beat

+ 2 - 0
docs/internals/reference/celery.concurrency.processes.pool.rst

@@ -2,6 +2,8 @@
  extended multiprocessing.pool - celery.concurrency.processes.pool
 ===================================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.concurrency.processes.pool
 
 .. automodule:: celery.concurrency.processes.pool

+ 2 - 0
docs/internals/reference/celery.concurrency.processes.rst

@@ -2,6 +2,8 @@
  Multiprocessing Pool Support - celery.concurrency.processes
 =============================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.concurrency.processes
 
 .. automodule:: celery.concurrency.processes

+ 2 - 0
docs/internals/reference/celery.concurrency.threads.rst

@@ -2,6 +2,8 @@
  Thread Pool Support **EXPERIMENTAL** - celery.concurrency.threads
 ===================================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.concurrency.threads
 
 .. automodule:: celery.concurrency.threads

+ 2 - 0
docs/internals/reference/celery.datastructures.rst

@@ -2,6 +2,8 @@
 Datastructures - celery.datastructures
 =======================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.datastructures
 
 .. automodule:: celery.datastructures

+ 2 - 0
docs/internals/reference/celery.db.models.rst

@@ -2,6 +2,8 @@
  SQLAlchemy Models - celery.db.models
 ======================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.db.models
 
 .. automodule:: celery.db.models

+ 2 - 0
docs/internals/reference/celery.db.session.rst

@@ -2,6 +2,8 @@
  SQLAlchemy Session - celery.db.session
 ========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.db.session
 
 .. automodule:: celery.db.session

+ 2 - 0
docs/internals/reference/celery.execute.trace.rst

@@ -2,6 +2,8 @@
  Tracing Execution - celery.execute.trace
 ==========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.execute.trace
 
 .. automodule:: celery.execute.trace

+ 2 - 0
docs/internals/reference/celery.log.rst

@@ -2,6 +2,8 @@
 Logging - celery.log
 ==========================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.log
 
 .. automodule:: celery.log

+ 2 - 0
docs/internals/reference/celery.platform.rst

@@ -2,6 +2,8 @@
  Platform Specific - celery.platform
 =====================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.platform
 
 .. automodule:: celery.platform

+ 2 - 0
docs/internals/reference/celery.routes.rst

@@ -2,6 +2,8 @@
  Message Routers - celery.routes
 =================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.routes
 
 .. automodule:: celery.routes

+ 2 - 0
docs/internals/reference/celery.serialization.rst

@@ -2,6 +2,8 @@
  Serialization Tools - celery.serialization
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.serialization
 
 .. automodule:: celery.serialization

+ 2 - 0
docs/internals/reference/celery.utils.compat.rst

@@ -2,6 +2,8 @@
  Python Compatibility - celery.utils.compat
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.compat
 
 .. automodule:: celery.utils.compat

+ 2 - 0
docs/internals/reference/celery.utils.dispatch.rst

@@ -2,6 +2,8 @@
  Signal Dispatch - celery.utils.dispatch
 =========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.dispatch
 
 .. automodule:: celery.utils.dispatch

+ 2 - 0
docs/internals/reference/celery.utils.dispatch.saferef.rst

@@ -2,6 +2,8 @@
  Signals: Safe References - celery.utils.dispatch.saferef
 ==========================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.dispatch.saferef
 
 .. automodule:: celery.utils.dispatch.saferef

+ 2 - 0
docs/internals/reference/celery.utils.dispatch.signal.rst

@@ -2,6 +2,8 @@
  Signals: Dispatcher - celery.utils.dispatch.signal
 ====================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.dispatch.signal
 
 .. automodule:: celery.utils.dispatch.signal

+ 2 - 0
docs/internals/reference/celery.utils.functional.rst

@@ -2,6 +2,8 @@
  functools compat - celery.utils.functional
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.functional
 
 .. automodule:: celery.utils.functional

+ 2 - 0
docs/internals/reference/celery.utils.info.rst

@@ -2,6 +2,8 @@
  Debugging Info - celery.utils.info
 ====================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.info
 
 .. automodule:: celery.utils.info

+ 2 - 0
docs/internals/reference/celery.utils.mail.rst

@@ -2,6 +2,8 @@
  Sending E-mail - celery.utils.mail
 ====================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.mail
 
 .. automodule:: celery.utils.mail

+ 2 - 0
docs/internals/reference/celery.utils.patch.rst

@@ -2,6 +2,8 @@
  Compatibility Patches - celery.utils.patch
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.patch
 
 .. automodule:: celery.utils.patch

+ 2 - 0
docs/internals/reference/celery.utils.rst

@@ -2,6 +2,8 @@
  Utilities - celery.utils
 ==========================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils
 
 .. automodule:: celery.utils

+ 2 - 0
docs/internals/reference/celery.utils.timeutils.rst

@@ -2,6 +2,8 @@
  Time and Date Utilities - celery.utils.timeutils
 ==================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.utils.timeutils
 
 .. automodule:: celery.utils.timeutils

+ 2 - 0
docs/internals/reference/celery.worker.buckets.rst

@@ -2,6 +2,8 @@
  Token Bucket (rate limiting) - celery.worker.buckets
 ======================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.buckets
 
 .. automodule:: celery.worker.buckets

+ 3 - 0
docs/internals/reference/celery.worker.control.builtins.rst

@@ -2,6 +2,9 @@
  Built-in Remote Control Commands - celery.worker.control.builtins
 ===================================================================
 
+.. contents::
+    :local:
+
 .. currentmodule:: celery.worker.control.builtins
 
 .. automodule:: celery.worker.control.builtins

+ 2 - 0
docs/internals/reference/celery.worker.control.registry.rst

@@ -2,6 +2,8 @@
  Remote Control Command Registry - celery.worker.control.registry
 ==================================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.control.registry
 
 .. automodule:: celery.worker.control.registry

+ 2 - 0
docs/internals/reference/celery.worker.control.rst

@@ -2,6 +2,8 @@
  Worker Control - celery.worker.control
 ========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.control
 
 .. automodule:: celery.worker.control

+ 2 - 0
docs/internals/reference/celery.worker.controllers.rst

@@ -2,6 +2,8 @@
  Worker Controller Threads - celery.worker.controllers
 =======================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.controllers
 
 .. automodule:: celery.worker.controllers

+ 2 - 0
docs/internals/reference/celery.worker.heartbeat.rst

@@ -2,6 +2,8 @@
  Worker Heartbeats - celery.worker.heartbeat
 =============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.heartbeat
 
 .. automodule:: celery.worker.heartbeat

+ 2 - 0
docs/internals/reference/celery.worker.job.rst

@@ -2,6 +2,8 @@
  Executable Jobs - celery.worker.job
 =====================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.job
 
 .. automodule:: celery.worker.job

+ 2 - 0
docs/internals/reference/celery.worker.listener.rst

@@ -2,6 +2,8 @@
  Worker Message Listener - celery.worker.listener
 ==================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.listener
 
 .. automodule:: celery.worker.listener

+ 2 - 0
docs/internals/reference/celery.worker.rst

@@ -2,6 +2,8 @@
 Multiprocessing Worker - celery.worker
 ========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker
 
 .. automodule:: celery.worker

+ 2 - 0
docs/internals/reference/celery.worker.scheduler.rst

@@ -2,6 +2,8 @@
  Worker Scheduler - celery.worker.scheduler
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.worker.scheduler
 
 .. automodule:: celery.worker.scheduler

+ 5 - 3
docs/internals/worker.rst

@@ -2,8 +2,11 @@
  Internals: The worker
 =======================
 
-**NOTE** This describes the internals of the development version, not the
-current release.
+.. contents::
+    :local:
+
+Introduction
+============
 
 The worker consists of 4 main components: the broker listener, the scheduler,
 the mediator and the task pool. All these components runs in parallel working
@@ -29,7 +32,6 @@ The ETA schedule is a heap queue sorted by time.
 Components
 ==========
 
-
 CarrotListener
 --------------
 

+ 2 - 0
docs/reference/celery.bin.camqadm.rst

@@ -2,6 +2,8 @@
  caqmadm: AMQP API Command-line Shell - celery.bin.camqadm
 ===========================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.bin.camqadm
 
 .. automodule:: celery.bin.camqadm

+ 2 - 0
docs/reference/celery.bin.celerybeat.rst

@@ -2,6 +2,8 @@
 Celery Periodic Task Server - celery.bin.celerybeat
 ===================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.bin.celerybeat
 
 .. automodule:: celery.bin.celerybeat

+ 2 - 0
docs/reference/celery.bin.celeryd.rst

@@ -2,6 +2,8 @@
 Celery Worker Daemon - celery.bin.celeryd
 ==========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.bin.celeryd
 
 .. automodule:: celery.bin.celeryd

+ 2 - 0
docs/reference/celery.bin.celeryd_multi.rst

@@ -2,6 +2,8 @@
  Celeryd Multi Tool - celery.bin.celeryd_multi
 ===============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.bin.celeryd_multi
 
 .. automodule:: celery.bin.celeryd_multi

+ 2 - 0
docs/reference/celery.bin.celeryev.rst

@@ -2,6 +2,8 @@
  celeryev: Curses Event Viewer - celery.bin.celeryev
 =====================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.bin.celeryev
 
 .. automodule:: celery.bin.celeryev

+ 4 - 0
docs/reference/celery.conf.rst

@@ -2,6 +2,10 @@
 Configuration - celery.conf
 ============================
 
+.. contents::
+    :local:
+.. currentmodule:: celery.conf
+
 .. data:: QUEUES
 
     Queue name/options mapping.

+ 7 - 4
docs/reference/celery.contrib.abortable.rst

@@ -2,8 +2,11 @@
  Contrib: Abortable tasks - celery.contrib.abortable
 =======================================================
 
- .. currentmodule:: celery.contrib.abortable
+.. contents::
+    :local:
 
- .. automodule:: celery.contrib.abortable
-     :members:
-     :undoc-members:
+.. currentmodule:: celery.contrib.abortable
+
+.. automodule:: celery.contrib.abortable
+    :members:
+    :undoc-members:

+ 2 - 0
docs/reference/celery.decorators.rst

@@ -2,6 +2,8 @@
  Task Decorators - celery.decorators
 =====================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.decorators
 
 .. automodule:: celery.decorators

+ 2 - 0
docs/reference/celery.events.rst

@@ -2,6 +2,8 @@
  Events - celery.events
 ========================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.events
 
 .. automodule:: celery.events

+ 2 - 0
docs/reference/celery.events.state.rst

@@ -2,6 +2,8 @@
  In-memory Representation of Cluster State - celery.events.state
 =================================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.events.state
 
 .. automodule:: celery.events.state

+ 2 - 0
docs/reference/celery.exceptions.rst

@@ -2,6 +2,8 @@
  Exceptions - celery.exceptions
 ================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.exceptions
 
 .. automodule:: celery.exceptions

+ 2 - 0
docs/reference/celery.execute.rst

@@ -2,6 +2,8 @@
  Executing Tasks - celery.execute
 ==================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.execute
 
 .. automodule:: celery.execute

+ 2 - 0
docs/reference/celery.loaders.base.rst

@@ -2,6 +2,8 @@
  Loader Base Classes - celery.loaders.base
 ===========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.loaders.base
 
 .. automodule:: celery.loaders.base

+ 2 - 0
docs/reference/celery.loaders.default.rst

@@ -2,6 +2,8 @@
  Default Loader - celery.loaders.default
 =========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.loaders.default
 
 .. automodule:: celery.loaders.default

+ 2 - 0
docs/reference/celery.loaders.rst

@@ -2,6 +2,8 @@
  Loaders - celery.loaders
 ============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.loaders
 
 .. automodule:: celery.loaders

+ 2 - 0
docs/reference/celery.messaging.rst

@@ -2,6 +2,8 @@
 Messaging - celery.messaging
 ==============================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.messaging
 
 .. automodule:: celery.messaging

+ 2 - 0
docs/reference/celery.registry.rst

@@ -2,6 +2,8 @@
 Task Registry - celery.registry
 ================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.registry
 
 .. automodule:: celery.registry

+ 2 - 0
docs/reference/celery.result.rst

@@ -2,6 +2,8 @@
 Task Result - celery.result
 =============================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.result
 
 .. automodule:: celery.result

+ 4 - 0
docs/reference/celery.signals.rst

@@ -2,6 +2,10 @@
 Signals - celery.signals
 ========================================
 
+.. contents::
+    :local:
+.. currentmodule:: celery.signals
+
 .. data:: task_sent
 
     Triggered when a task has been sent to the broker.

+ 2 - 0
docs/reference/celery.states.rst

@@ -2,6 +2,8 @@
  Task States - celery.states
 =============================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.states
 
 .. automodule:: celery.states

+ 2 - 0
docs/reference/celery.task.base.rst

@@ -2,6 +2,8 @@
  Defining Tasks - celery.task.base
 ===================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.task.base
 
 .. automodule:: celery.task.base

+ 2 - 0
docs/reference/celery.task.builtins.rst

@@ -2,6 +2,8 @@
  Built-in Task Classes - celery.task.builtins
 ==============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.task.builtins
 
 .. automodule:: celery.task.builtins

+ 2 - 0
docs/reference/celery.task.control.rst

@@ -2,6 +2,8 @@
  Remote Management of Workers - celery.task.control
 ====================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.task.control
 
 .. automodule:: celery.task.control

+ 2 - 0
docs/reference/celery.task.http.rst

@@ -2,6 +2,8 @@
  HTTP Callback Tasks - celery.task.http
 ========================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.task.http
 
 .. automodule:: celery.task.http

+ 2 - 0
docs/reference/celery.task.rst

@@ -2,6 +2,8 @@
  Task Information and Utilities - celery.task
 ==============================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.task
 
 .. automodule:: celery.task

+ 2 - 0
docs/reference/celery.task.schedules.rst

@@ -2,6 +2,8 @@
  Periodic Task Schedule Behaviors - celery.task.schedules
 ==========================================================
 
+.. contents::
+    :local:
 .. currentmodule:: celery.task.schedules
 
 .. automodule:: celery.task.schedules

+ 6 - 3
docs/tutorials/clickcounter.rst

@@ -2,6 +2,9 @@
  Tutorial: Creating a click counter using carrot and celery
 ============================================================
 
+.. contents::
+    :local:
+
 Introduction
 ============
 
@@ -147,7 +150,7 @@ On to the code...
                 messages_for_url[url].append(message)
             else:
                 messages_for_url[url] = [message]
-    
+
         # Then increment the clicks in the database so we only need
         # one UPDATE/INSERT for each URL.
         for url, click_count in clicks_for_urls.items():
@@ -155,7 +158,7 @@ On to the code...
             # Now that the clicks has been registered for this URL we can
             # acknowledge the messages
             [message.ack() for message in messages_for_url[url]]
-        
+
         consumer.close()
         connection.close()
 
@@ -214,7 +217,7 @@ Processing the clicks every 30 minutes is easy using celery periodic tasks.
 
     class ProcessClicksTask(PeriodicTask):
         run_every = timedelta(minutes=30)
-    
+
         def run(self, \*\*kwargs):
             process_clicks()
 

+ 8 - 1
docs/tutorials/external.rst

@@ -2,8 +2,15 @@
  External tutorials and resources
 ==================================
 
+This is a list of external blog posts, tutorials and slides related
+to Celery. If you have a link that's missing from this list, please
+contact the mailing-list or submit a patch.
+
+.. contents::
+    :local:
+
 Introduction to Celery
-----------------------
+======================
 
 Awesome slides from when `Idan Gazit`_ had a talk about Celery at `PyWeb-IL`_:
 http://www.slideshare.net/idangazit/an-introduction-to-celery

+ 3 - 0
docs/tutorials/otherqueues.rst

@@ -9,6 +9,9 @@ an extension to `carrot`_.
 .. _`carrot`: http://pypi.python.org/pypi/carrot
 .. _`ghettoq`: http://pypi.python.org/pypi/ghettoq
 
+.. contents::
+    :local:
+
 Installation
 ============
 

+ 11 - 5
docs/userguide/executing.rst

@@ -2,6 +2,12 @@
  Executing Tasks
 =================
 
+.. contents::
+    :local:
+
+Basics
+======
+
 Executing tasks is done with :meth:`~celery.task.Base.Task.apply_async`,
 and its shortcut: :meth:`~celery.task.Base.Task.delay`.
 
@@ -43,7 +49,7 @@ task, which adds together two numbers:
 
 
 ETA and countdown
------------------
+=================
 
 The ETA (estimated time of arrival) lets you set a specific date and time that
 is the earliest time at which your task will execute. ``countdown`` is
@@ -75,7 +81,7 @@ have a :class:`~datetime.datetime`` object and need to modify it with a
 
 
 Serializers
------------
+===========
 
 Data passed between celery and workers has to be serialized to be
 transferred. The default serializer is :mod:`pickle`, but you can 
@@ -104,7 +110,7 @@ configuration directive.
     >>> add.apply_async(args=[10, 10], serializer="json")
 
 Connections and connection timeouts.
-------------------------------------
+====================================
 
 Currently there is no support for broker connection pools in celery,
 so this is something you need to be aware of when sending more than
@@ -165,7 +171,7 @@ Or if you handle the connection manually:
 
 
 Routing options
----------------
+===============
 
 Celery uses the AMQP routing mechanisms to route tasks to different workers.
 You can route tasks using the following entities: exchange, queue and routing key.
@@ -227,7 +233,7 @@ by creating a new queue that binds to ``"image.crop``".
 
 
 AMQP options
-------------
+============
 
 * mandatory
 

+ 12 - 2
docs/userguide/remote-tasks.rst

@@ -4,8 +4,11 @@
 
 .. module:: celery.task.http
 
-Executing tasks on a web server
--------------------------------
+.. contents::
+    :local:
+
+Basics
+======
 
 If you need to call into another language, framework or similar, you can
 do so by using HTTP callback tasks.
@@ -31,6 +34,8 @@ or if there was an error::
 
     {"status": "failure": "reason": "Invalid moon alignment."}
 
+Django webhook example
+======================
 
 With this information you could define a simple task in Django:
 
@@ -47,6 +52,8 @@ With this information you could define a simple task in Django:
         response = {"status": "success", "retval": result}
         return HttpResponse(serialize(response), mimetype="application/json")
 
+Ruby on Rails webhook example
+=============================
 
 or in Ruby on Rails:
 
@@ -64,6 +71,9 @@ or in Ruby on Rails:
 You can easily port this scheme to any language/framework;
 new examples and libraries are very welcome.
 
+Executing webhook tasks
+=======================
+
 To execute the task you use the :class:`URL` class:
 
     >>> from celery.task.http import URL

+ 3 - 0
docs/userguide/routing.rst

@@ -8,6 +8,9 @@ respective documenation for more information, or contact the `mailinglist`_.
 
 .. _`mailinglist`: http://groups.google.com/group/celery-users
 
+.. contents::
+    :local:
+
 AMQP Primer
 ===========
 

+ 3 - 0
docs/userguide/tasks.rst

@@ -4,6 +4,9 @@
 
 .. module:: celery.task.base
 
+.. contents::
+    :local:
+
 A task is a class that encapsulates a function and its execution options.
 Given a function ``create_user``, that takes two arguments: ``username`` and
 ``password``, you can create a task like this:

+ 3 - 0
docs/userguide/workers.rst

@@ -2,6 +2,9 @@
  Workers Guide
 ===============
 
+.. contents::
+    :local:
+
 Starting the worker
 ===================