瀏覽代碼

Documentation: Added refs to all sections (phew)

Ask Solem 14 年之前
父節點
當前提交
e507bb42a1

文件差異過大導致無法顯示
+ 259 - 122
Changelog


+ 16 - 0
docs/community.rst

@@ -1,3 +1,5 @@
+.. _community:
+
 =======================
 =======================
   Community Resources
   Community Resources
 =======================
 =======================
@@ -9,34 +11,48 @@ contact the mailing-list or submit a patch.
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _community-resources:
+
 Resources
 Resources
 =========
 =========
 
 
+.. _res-using-celery:
+
 Who's using Celery
 Who's using Celery
 ------------------
 ------------------
 
 
 http://wiki.github.com/ask/celery/using
 http://wiki.github.com/ask/celery/using
 
 
+.. _res-wiki:
+
 Wiki
 Wiki
 ----
 ----
 
 
 http://wiki.github.com/ask/celery/
 http://wiki.github.com/ask/celery/
 
 
+.. _res-stackoverflow:
+
 Celery questions on Stack Overflow
 Celery questions on Stack Overflow
 ----------------------------------
 ----------------------------------
 
 
 http://stackoverflow.com/search?q=celery&tab=newest
 http://stackoverflow.com/search?q=celery&tab=newest
 
 
+.. _res-mailing-list-archive:
+
 Mailing-list Archive: celery-users
 Mailing-list Archive: celery-users
 ----------------------------------
 ----------------------------------
 
 
 http://blog.gmane.org/gmane.comp.python.amqp.celery.user
 http://blog.gmane.org/gmane.comp.python.amqp.celery.user
 
 
+.. _res-irc-logs:
+
 IRC Logs
 IRC Logs
 --------
 --------
 
 
 http://botland.oebfare.com/logger/celery/
 http://botland.oebfare.com/logger/celery/
 
 
+.. _community-news:
+
 News
 News
 ====
 ====
 
 

+ 43 - 0
docs/configuration.rst

@@ -1,3 +1,5 @@
+.. _configuration:
+
 ============================
 ============================
  Configuration and defaults
  Configuration and defaults
 ============================
 ============================
@@ -10,6 +12,8 @@ module and make sure it is available on the Python path.
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _conf-example:
+
 Example configuration file
 Example configuration file
 ==========================
 ==========================
 
 
@@ -41,6 +45,8 @@ It should contain all you need to run a basic celery set-up.
     # CELERYD_LOG_FILE = "celeryd.log"
     # CELERYD_LOG_FILE = "celeryd.log"
     # CELERYD_LOG_LEVEL = "INFO"
     # CELERYD_LOG_LEVEL = "INFO"
 
 
+.. _conf-concurrency:
+
 Concurrency settings
 Concurrency settings
 ====================
 ====================
 
 
@@ -60,6 +66,7 @@ Concurrency settings
     number of messages initially. Thus the tasks may not be fairly balanced among the
     number of messages initially. Thus the tasks may not be fairly balanced among the
     workers.
     workers.
 
 
+.. _conf-result-backend:
 
 
 Task result backend settings
 Task result backend settings
 ============================
 ============================
@@ -96,6 +103,8 @@ Task result backend settings
 .. _`Redis`: http://code.google.com/p/redis/
 .. _`Redis`: http://code.google.com/p/redis/
 .. _`Tokyo Tyrant`: http://1978th.net/tokyotyrant/
 .. _`Tokyo Tyrant`: http://1978th.net/tokyotyrant/
 
 
+.. _conf-database-result-backend:
+
 Database backend settings
 Database backend settings
 =========================
 =========================
 
 
@@ -140,6 +149,8 @@ Example configuration
     CELERY_RESULT_BACKEND = "database"
     CELERY_RESULT_BACKEND = "database"
     CELERY_RESULT_DBURI = "mysql://user:password@host/dbname"
     CELERY_RESULT_DBURI = "mysql://user:password@host/dbname"
 
 
+.. _conf-amqp-result-backend:
+
 AMQP backend settings
 AMQP backend settings
 =====================
 =====================
 
 
@@ -167,6 +178,8 @@ Example configuration
 
 
     CELERY_RESULT_BACKEND = "amqp"
     CELERY_RESULT_BACKEND = "amqp"
 
 
+.. _conf-cache-result-backend:
+
 Cache backend settings
 Cache backend settings
 ======================
 ======================
 
 
@@ -199,6 +212,7 @@ setting:
 
 
 .. _`pylibmc`: http://sendapatch.se/projects/pylibmc/
 .. _`pylibmc`: http://sendapatch.se/projects/pylibmc/
 
 
+.. _conf-tyrant-result-backend:
 
 
 Tokyo Tyrant backend settings
 Tokyo Tyrant backend settings
 =============================
 =============================
@@ -224,6 +238,8 @@ Example configuration
     TT_HOST = "localhost"
     TT_HOST = "localhost"
     TT_PORT = 1978
     TT_PORT = 1978
 
 
+.. _conf-redis-result-backend:
+
 Redis backend settings
 Redis backend settings
 ======================
 ======================
 
 
@@ -265,6 +281,8 @@ Example configuration
     REDIS_DB = "celery_results"
     REDIS_DB = "celery_results"
     REDIS_CONNECT_RETRY=True
     REDIS_CONNECT_RETRY=True
 
 
+.. _conf-mongodb-result-backend:
+
 MongoDB backend settings
 MongoDB backend settings
 ========================
 ========================
 
 
@@ -308,10 +326,13 @@ Example configuration
         "taskmeta_collection": "my_taskmeta_collection",
         "taskmeta_collection": "my_taskmeta_collection",
     }
     }
 
 
+.. _conf-messaging:
 
 
 Messaging settings
 Messaging settings
 ==================
 ==================
 
 
+.. _conf-messaging-routing:
+
 Routing
 Routing
 -------
 -------
 
 
@@ -347,6 +368,8 @@ Routing
     Can be ``transient`` or ``persistent``. Default is to send
     Can be ``transient`` or ``persistent``. Default is to send
     persistent messages.
     persistent messages.
 
 
+.. _conf-broker-connection:
+
 Connection
 Connection
 ----------
 ----------
 
 
@@ -371,6 +394,8 @@ Connection
 
 
     Default is 100 retries.
     Default is 100 retries.
 
 
+.. _conf-task-execution:
+
 Task execution settings
 Task execution settings
 =======================
 =======================
 
 
@@ -451,6 +476,8 @@ Task execution settings
 
 
     See http://ask.github.com/celery/faq.html#should-i-use-retry-or-acks-late
     See http://ask.github.com/celery/faq.html#should-i-use-retry-or-acks-late
 
 
+.. _conf-celeryd:
+
 Worker: celeryd
 Worker: celeryd
 ===============
 ===============
 
 
@@ -495,6 +522,8 @@ Worker: celeryd
     If set, the worker stores all task errors in the result store even if
     If set, the worker stores all task errors in the result store even if
     ``Task.ignore_result`` is on.
     ``Task.ignore_result`` is on.
 
 
+.. _conf-error-mails:
+
 Error E-Mails
 Error E-Mails
 -------------
 -------------
 
 
@@ -528,6 +557,8 @@ Error E-Mails
 
 
     The port the mail server is listening on. Default is ``25``.
     The port the mail server is listening on. Default is ``25``.
 
 
+.. _conf-example-error-mail-config:
+
 Example E-Mail configuration
 Example E-Mail configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -554,6 +585,8 @@ This configuration enables the sending of error e-mails to
     # EMAIL_HOST_USER = "servers"
     # EMAIL_HOST_USER = "servers"
     # EMAIL_HOST_PASSWORD = "s3cr3t"
     # EMAIL_HOST_PASSWORD = "s3cr3t"
 
 
+.. _conf-events:
+
 Events
 Events
 ------
 ------
 
 
@@ -581,6 +614,8 @@ Events
     Message serialization format used when sending event messages. Default is
     Message serialization format used when sending event messages. Default is
     ``"json"``.
     ``"json"``.
 
 
+.. _conf-broadcast:
+
 Broadcast Commands
 Broadcast Commands
 ------------------
 ------------------
 
 
@@ -602,6 +637,8 @@ Broadcast Commands
 
 
     Exchange type used for broadcast messages. Default is ``"fanout"``.
     Exchange type used for broadcast messages. Default is ``"fanout"``.
 
 
+.. _conf-logging:
+
 Logging
 Logging
 -------
 -------
 
 
@@ -643,6 +680,8 @@ Logging
     See the Python :mod:`logging` module for more information about log
     See the Python :mod:`logging` module for more information about log
     formats.
     formats.
 
 
+.. _conf-custom-components:
+
 Custom Component Classes (advanced)
 Custom Component Classes (advanced)
 -----------------------------------
 -----------------------------------
 
 
@@ -666,6 +705,8 @@ Custom Component Classes (advanced)
     Name of the ETA scheduler class used by the worker.
     Name of the ETA scheduler class used by the worker.
     Default is ``"celery.worker.controllers.ScheduleController"``.
     Default is ``"celery.worker.controllers.ScheduleController"``.
 
 
+.. _conf-celerybeat:
+
 Periodic Task Server: celerybeat
 Periodic Task Server: celerybeat
 ================================
 ================================
 
 
@@ -697,6 +738,8 @@ Periodic Task Server: celerybeat
 
 
     See the :mod:`logging` module for more information.
     See the :mod:`logging` module for more information.
 
 
+.. _conf-celerymon:
+
 Monitor Server: celerymon
 Monitor Server: celerymon
 =========================
 =========================
 
 

+ 25 - 0
docs/cookbook/daemonizing.rst

@@ -1,3 +1,5 @@
+.. _daemonizing:
+
 =============================
 =============================
  Running celeryd as a daemon
  Running celeryd as a daemon
 =============================
 =============================
@@ -9,6 +11,9 @@ daemonization tools.
     :local:
     :local:
 
 
 
 
+.. _daemon-start-stop-daemon:
+
+
 start-stop-daemon (Debian/Ubuntu/++)
 start-stop-daemon (Debian/Ubuntu/++)
 ====================================
 ====================================
 
 
@@ -20,6 +25,8 @@ These scripts are configured in ``/etc/default/celeryd``.
 .. _`contrib/debian/init.d/`:
 .. _`contrib/debian/init.d/`:
     http://github.com/ask/celery/tree/master/contrib/debian/
     http://github.com/ask/celery/tree/master/contrib/debian/
 
 
+.. _debian-initd-celeryd:
+
 Init script: celeryd
 Init script: celeryd
 --------------------
 --------------------
 
 
@@ -29,6 +36,8 @@ Init script: celeryd
 To configure celeryd you probably need to at least tell it where to chdir
 To configure celeryd you probably need to at least tell it where to chdir
 when it starts (to find your celeryconfig).
 when it starts (to find your celeryconfig).
 
 
+.. _debian-initd-celeryd-example:
+
 Example configuration
 Example configuration
 ~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -45,6 +54,8 @@ This is an example configuration for a Python project.
     # Name of the celery config module.#
     # Name of the celery config module.#
     CELERY_CONFIG_MODULE="celeryconfig"
     CELERY_CONFIG_MODULE="celeryconfig"
 
 
+.. _debian-initd-celeryd-django-example:
+
 Example Django configuration
 Example Django configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -59,6 +70,8 @@ This is an example configuration for those using ``django-celery``::
     # Name of the projects settings module.
     # Name of the projects settings module.
     export DJANGO_SETTINGS_MODULE="settings"
     export DJANGO_SETTINGS_MODULE="settings"
 
 
+.. _debian-initd-celeryd-options:
+
 Available options
 Available options
 ~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~
 
 
@@ -87,11 +100,14 @@ Available options
 * CELERYD_GROUP
 * CELERYD_GROUP
     Group to run celeryd as. Default is current user.
     Group to run celeryd as. Default is current user.
 
 
+.. _debian-initd-celerybeat:
+
 Init script: celerybeat
 Init script: celerybeat
 -----------------------
 -----------------------
 :Usage: ``/etc/init.d/celerybeat {start|stop|force-reload|restart|try-restart|status}``
 :Usage: ``/etc/init.d/celerybeat {start|stop|force-reload|restart|try-restart|status}``
 :Configuration file: /etc/default/celerybeat or /etc/default/celeryd
 :Configuration file: /etc/default/celerybeat or /etc/default/celeryd
 
 
+.. _debian-initd-celerybeat-example:
 
 
 Example configuration
 Example configuration
 ~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~
@@ -112,6 +128,8 @@ This is an example configuration for a Python project:
     # Name of the celery config module.#
     # Name of the celery config module.#
     CELERY_CONFIG_MODULE="celeryconfig"
     CELERY_CONFIG_MODULE="celeryconfig"
 
 
+.. _debian-initd-celerybeat-django-example:
+
 Example Django configuration
 Example Django configuration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -132,6 +150,8 @@ This is an example configuration for those using ``django-celery``::
     # Extra arguments to celerybeat
     # Extra arguments to celerybeat
     CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule"
     CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule"
 
 
+.. _debian-initd-celerybeat-options:
+
 Available options
 Available options
 ~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~
 
 
@@ -158,6 +178,8 @@ Available options
 * CELERYBEAT_GROUP
 * CELERYBEAT_GROUP
     Group to run celeryd as. Default is current user.
     Group to run celeryd as. Default is current user.
 
 
+.. _debian-initd-troubleshooting:
+
 Troubleshooting
 Troubleshooting
 ---------------
 ---------------
 
 
@@ -184,6 +206,7 @@ actual resulting output::
     $ /opt/Opal/release/opal/manage.py celeryd --time-limit=300 \
     $ /opt/Opal/release/opal/manage.py celeryd --time-limit=300 \
         -f /var/log/celeryd.log -l INFO
         -f /var/log/celeryd.log -l INFO
 
 
+.. _daemon-supervisord:
 
 
 `supervisord`_
 `supervisord`_
 ==============
 ==============
@@ -194,6 +217,8 @@ actual resulting output::
     http://github.com/ask/celery/tree/master/contrib/supervisord/
     http://github.com/ask/celery/tree/master/contrib/supervisord/
 .. _`supervisord`: http://supervisord.org/
 .. _`supervisord`: http://supervisord.org/
 
 
+.. _daemon-launchd:
+
 launchd (OS X)
 launchd (OS X)
 ==============
 ==============
 
 

+ 2 - 0
docs/cookbook/index.rst

@@ -1,3 +1,5 @@
+.. _cookbook:
+
 ===========
 ===========
  Cookbook
  Cookbook
 ===========
 ===========

+ 3 - 0
docs/cookbook/tasks.rst

@@ -1,3 +1,5 @@
+.. _cookbook-tasks:
+
 ================
 ================
  Creating Tasks
  Creating Tasks
 ================
 ================
@@ -5,6 +7,7 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _cookbook-task-serial:
 
 
 Ensuring a task is only executed one at a time
 Ensuring a task is only executed one at a time
 ==============================================
 ==============================================

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

@@ -1,3 +1,5 @@
+.. _broker-installation:
+
 =====================
 =====================
  Broker Installation
  Broker Installation
 =====================
 =====================
@@ -5,6 +7,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _installing-rabbitmq:
+
 Installing RabbitMQ
 Installing RabbitMQ
 ===================
 ===================
 
 
@@ -13,6 +17,8 @@ see `Installing RabbitMQ on OS X`_.
 
 
 .. _`Installing RabbitMQ`: http://www.rabbitmq.com/install.html
 .. _`Installing RabbitMQ`: http://www.rabbitmq.com/install.html
 
 
+.. _rabbitmq-configuration:
+
 Setting up RabbitMQ
 Setting up RabbitMQ
 ===================
 ===================
 
 
@@ -31,6 +37,7 @@ See the RabbitMQ `Admin Guide`_ for more information about `access control`_.
 
 
 .. _`access control`: http://www.rabbitmq.com/admin-guide.html#access-control
 .. _`access control`: http://www.rabbitmq.com/admin-guide.html#access-control
 
 
+.. _rabbitmq-osx-installation:
 
 
 Installing RabbitMQ on OS X
 Installing RabbitMQ on OS X
 ===========================
 ===========================
@@ -71,6 +78,8 @@ Finally, we can install rabbitmq using ``brew``::
 .. _`Homebrew`: http://github.com/mxcl/homebrew/
 .. _`Homebrew`: http://github.com/mxcl/homebrew/
 .. _`git`: http://git-scm.org
 .. _`git`: http://git-scm.org
 
 
+.. _rabbitmq-osx-system-hostname:
+
 Configuring the system hostname
 Configuring the system hostname
 -------------------------------
 -------------------------------
 
 
@@ -106,6 +115,8 @@ This is especially important if your DHCP server gives you a hostname
 starting with an IP address, (e.g. ``23.10.112.31.comcast.net``), because
 starting with an IP address, (e.g. ``23.10.112.31.comcast.net``), because
 then RabbitMQ will try to use ``rabbit@23``, which is an illegal hostname.
 then RabbitMQ will try to use ``rabbit@23``, which is an illegal hostname.
 
 
+.. _rabbitmq-osx-start-stop:
+
 Starting/Stopping the RabbitMQ server
 Starting/Stopping the RabbitMQ server
 -------------------------------------
 -------------------------------------
 
 

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

@@ -1,3 +1,5 @@
+.. _tut-celery:
+
 ========================
 ========================
  First steps with Celery
  First steps with Celery
 ========================
 ========================
@@ -5,6 +7,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _celerytut-simple-tasks:
+
 Creating a simple task
 Creating a simple task
 ======================
 ======================
 
 
@@ -32,6 +36,7 @@ function in an appropriate class for us automatically. The full
 documentation on how to create tasks and task classes is in the
 documentation on how to create tasks and task classes is in the
 :doc:`../userguide/tasks` part of the user guide.
 :doc:`../userguide/tasks` part of the user guide.
 
 
+.. _celerytut-conf:
 
 
 Configuration
 Configuration
 =============
 =============
@@ -84,6 +89,8 @@ could use a persistent result store backend, but for now, this should
 do. For all of the options available, see the 
 do. For all of the options available, see the 
 :doc:`configuration directive reference<../configuration>`.
 :doc:`configuration directive reference<../configuration>`.
 
 
+.. _celerytut-running-celeryd:
+
 Running the celery worker server
 Running the celery worker server
 ================================
 ================================
 
 
@@ -106,6 +113,8 @@ For info on how to run celery as standalone daemon, see
 
 
 .. _`supervisord`: http://supervisord.org
 .. _`supervisord`: http://supervisord.org
 
 
+.. _celerytut-executing-task:
+
 Executing the task
 Executing the task
 ==================
 ==================
 
 

+ 2 - 0
docs/getting-started/introduction.rst

@@ -1,3 +1,5 @@
+.. _intro:
+
 ==============
 ==============
  Introduction
  Introduction
 ==============
 ==============

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

@@ -1,3 +1,5 @@
+.. _resources:
+
 ===========
 ===========
  Resources
  Resources
 ===========
 ===========

+ 18 - 2
docs/includes/introduction.txt

@@ -7,6 +7,8 @@
 
 
 --
 --
 
 
+.. _celery-synopsis:
+
 Celery is an open source asynchronous task queue/job queue based on
 Celery is an open source asynchronous task queue/job queue based on
 distributed message passing. It is focused on real-time operation,
 distributed message passing. It is focused on real-time operation,
 but supports scheduling as well.
 but supports scheduling as well.
@@ -36,6 +38,8 @@ delivered by the `django-celery`_ package.
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _celery-overview:
+
 Overview
 Overview
 ========
 ========
 
 
@@ -50,6 +54,8 @@ more machines depending on the workload.
 The result of the task can be stored for later retrieval (called its
 The result of the task can be stored for later retrieval (called its
 "tombstone").
 "tombstone").
 
 
+.. _celery-example:
+
 Example
 Example
 =======
 =======
 
 
@@ -72,6 +78,8 @@ You can execute the task in the background, or wait for it to finish::
 
 
 Simple!
 Simple!
 
 
+.. _celery-features:
+
 Features
 Features
 ========
 ========
 
 
@@ -161,6 +169,8 @@ Features
 .. _`MongoDB`: http://www.mongodb.org/
 .. _`MongoDB`: http://www.mongodb.org/
 .. _`Tokyo Tyrant`: http://tokyocabinet.sourceforge.net/
 .. _`Tokyo Tyrant`: http://tokyocabinet.sourceforge.net/
 
 
+.. _celery-documentation:
+
 Documentation
 Documentation
 =============
 =============
 
 
@@ -169,8 +179,10 @@ is hosted at Github.
 
 
 .. _`latest documentation`: http://ask.github.com/celery/
 .. _`latest documentation`: http://ask.github.com/celery/
 
 
+.. _celery-installation:
+
 Installation
 Installation
-=============
+============
 
 
 You can install ``celery`` either via the Python Package Index (PyPI)
 You can install ``celery`` either via the Python Package Index (PyPI)
 or from source.
 or from source.
@@ -183,6 +195,8 @@ To install using ``easy_install``,::
 
 
     $ easy_install celery
     $ easy_install celery
 
 
+.. _celery-installing-from-source:
+
 Downloading and installing from source
 Downloading and installing from source
 --------------------------------------
 --------------------------------------
 
 
@@ -196,8 +210,10 @@ You can install it by doing the following,::
     $ python setup.py build
     $ python setup.py build
     # python setup.py install # as root
     # python setup.py install # as root
 
 
+.. _celery-installing-from-git:
+
 Using the development version
 Using the development version
-------------------------------
+-----------------------------
 
 
 You can clone the repository by doing the following::
 You can clone the repository by doing the following::
 
 

+ 12 - 0
docs/includes/resources.txt

@@ -1,7 +1,10 @@
+.. _getting-help:
 
 
 Getting Help
 Getting Help
 ============
 ============
 
 
+.. _mailing-list:
+
 Mailing list
 Mailing list
 ------------
 ------------
 
 
@@ -10,6 +13,8 @@ please join the `celery-users`_ mailing list.
 
 
 .. _`celery-users`: http://groups.google.com/group/celery-users/
 .. _`celery-users`: http://groups.google.com/group/celery-users/
 
 
+.. _irc-channel:
+
 IRC
 IRC
 ---
 ---
 
 
@@ -19,6 +24,7 @@ network.
 .. _`#celery`: irc://irc.freenode.net/celery
 .. _`#celery`: irc://irc.freenode.net/celery
 .. _`Freenode`: http://freenode.net
 .. _`Freenode`: http://freenode.net
 
 
+.. _bug-tracker:
 
 
 Bug tracker
 Bug tracker
 ===========
 ===========
@@ -26,11 +32,15 @@ Bug tracker
 If you have any suggestions, bug reports or annoyances please report them
 If you have any suggestions, bug reports or annoyances please report them
 to our issue tracker at http://github.com/ask/celery/issues/
 to our issue tracker at http://github.com/ask/celery/issues/
 
 
+.. _wiki:
+
 Wiki
 Wiki
 ====
 ====
 
 
 http://wiki.github.com/ask/celery/
 http://wiki.github.com/ask/celery/
 
 
+.. _contributing:
+
 Contributing
 Contributing
 ============
 ============
 
 
@@ -40,6 +50,8 @@ You are highly encouraged to participate in the development
 of ``celery``. If you don't like Github (for some reason) you're welcome
 of ``celery``. If you don't like Github (for some reason) you're welcome
 to send regular patches.
 to send regular patches.
 
 
+.. _license:
+
 License
 License
 =======
 =======
 
 

+ 4 - 0
docs/internals/deprecation.rst

@@ -1,3 +1,5 @@
+.. _deprecation-timeline:
+
 =============================
 =============================
  Celery Deprecation Timeline
  Celery Deprecation Timeline
 =============================
 =============================
@@ -5,6 +7,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _deprecations-v2.0:
+
 Removals for version 2.0
 Removals for version 2.0
 ========================
 ========================
 
 

+ 2 - 0
docs/internals/index.rst

@@ -1,3 +1,5 @@
+.. _internals:
+
 ===========
 ===========
  Internals
  Internals
 ===========
 ===========

+ 2 - 0
docs/internals/moduleindex.rst

@@ -1,3 +1,5 @@
+.. _internals-module-overview:
+
 ==============
 ==============
  Module Index
  Module Index
 ==============
 ==============

+ 2 - 0
docs/internals/protocol.rst

@@ -1,3 +1,5 @@
+.. _internals-task-message-protocol:
+
 =======================
 =======================
  Task Message Protocol
  Task Message Protocol
 =======================
 =======================

+ 2 - 0
docs/internals/worker.rst

@@ -1,3 +1,5 @@
+.. _internals-worker:
+
 =======================
 =======================
  Internals: The worker
  Internals: The worker
 =======================
 =======================

+ 7 - 0
docs/links.rst

@@ -1,7 +1,10 @@
+.. _links:
+
 ===================
 ===================
  Interesting Links
  Interesting Links
 ===================
 ===================
 
 
+.. _links-celery:
 
 
 celery
 celery
 ------
 ------
@@ -9,6 +12,8 @@ celery
 * IRC logs from ``#celery`` (Freenode):
 * IRC logs from ``#celery`` (Freenode):
     http://botland.oebfare.com/logger/celery/
     http://botland.oebfare.com/logger/celery/
 
 
+.. _links-amqp:
+
 AMQP
 AMQP
 ----
 ----
 
 
@@ -20,6 +25,8 @@ AMQP
 
 
 .. _`Shovel`: http://bit.ly/xFEde
 .. _`Shovel`: http://bit.ly/xFEde
 
 
+.. _links-rabbitmq:
+
 RabbitMQ
 RabbitMQ
 --------
 --------
 
 

+ 2 - 0
docs/tutorials/clickcounter.rst

@@ -1,3 +1,5 @@
+.. _tut-clickcounter:
+
 ============================================================
 ============================================================
  Tutorial: Creating a click counter using carrot and celery
  Tutorial: Creating a click counter using carrot and celery
 ============================================================
 ============================================================

+ 14 - 0
docs/tutorials/otherqueues.rst

@@ -1,3 +1,5 @@
+.. _tut-otherqueues:
+
 ==========================================================
 ==========================================================
  Using Celery with Redis/Database as the messaging queue.
  Using Celery with Redis/Database as the messaging queue.
 ==========================================================
 ==========================================================
@@ -12,6 +14,8 @@ an extension to `carrot`_.
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _otherqueues-installation:
+
 Installation
 Installation
 ============
 ============
 
 
@@ -19,6 +23,8 @@ You need to install the `ghettoq`_ library::
 
 
     $ pip install -U ghettoq
     $ pip install -U ghettoq
 
 
+.. _otherqueues-redis:
+
 Redis
 Redis
 =====
 =====
 
 
@@ -26,6 +32,8 @@ For the Redis support you have to install the Python redis client::
 
 
     $ pip install -U redis
     $ pip install -U redis
 
 
+.. _otherqueues-redis-conf:
+
 Configuration
 Configuration
 -------------
 -------------
 
 
@@ -38,9 +46,13 @@ your Redis database::
     BROKER_PORT = 6379         # Maps to redis port.
     BROKER_PORT = 6379         # Maps to redis port.
     BROKER_VHOST = "celery"    # Maps to database name.
     BROKER_VHOST = "celery"    # Maps to database name.
 
 
+.. _otherqueues-database:
+
 Database
 Database
 ========
 ========
 
 
+.. _otherqueues-database-conf:
+
 Configuration
 Configuration
 -------------
 -------------
 
 
@@ -75,6 +87,8 @@ configuration values.
 
 
         $ python manage.py syncdb
         $ python manage.py syncdb
 
 
+.. _otherqueues-notes:
+
 Important notes
 Important notes
 ---------------
 ---------------
 
 

+ 12 - 0
docs/userguide/executing.rst

@@ -1,3 +1,5 @@
+.. _guide-executing:
+
 =================
 =================
  Executing Tasks
  Executing Tasks
 =================
 =================
@@ -5,6 +7,9 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+
+.. _executing-basics:
+
 Basics
 Basics
 ======
 ======
 
 
@@ -48,6 +53,8 @@ task, which adds together two numbers:
         return x + y
         return x + y
 
 
 
 
+.. _executing-eta:
+
 ETA and countdown
 ETA and countdown
 =================
 =================
 
 
@@ -78,6 +85,7 @@ have a :class:`~datetime.datetime` object and need to modify it with a
         tomorrow = datetime.now() + timedelta(days=1)
         tomorrow = datetime.now() + timedelta(days=1)
         add.apply_async(args=[10, 10], eta=tomorrow)
         add.apply_async(args=[10, 10], eta=tomorrow)
 
 
+.. _executing-serializers:
 
 
 Serializers
 Serializers
 ===========
 ===========
@@ -108,6 +116,8 @@ configuration directive.
 
 
     >>> add.apply_async(args=[10, 10], serializer="json")
     >>> add.apply_async(args=[10, 10], serializer="json")
 
 
+.. _executing-connections:
+
 Connections and connection timeouts.
 Connections and connection timeouts.
 ====================================
 ====================================
 
 
@@ -150,6 +160,7 @@ Or if you handle the connection manually:
 
 
     publisher = add.get_publisher(connect_timeout=3)
     publisher = add.get_publisher(connect_timeout=3)
 
 
+.. _executing-routing:
 
 
 Routing options
 Routing options
 ===============
 ===============
@@ -212,6 +223,7 @@ Later, if the crop task is consuming a lot of resources,
 we can bind some new workers to handle just the ``"image.crop"`` task,
 we can bind some new workers to handle just the ``"image.crop"`` task,
 by creating a new queue that binds to ``"image.crop``".
 by creating a new queue that binds to ``"image.crop``".
 
 
+.. _executing-amq-opts:
 
 
 AMQP options
 AMQP options
 ============
 ============

+ 38 - 4
docs/userguide/monitoring.rst

@@ -1,3 +1,5 @@
+.. _guide-monitoring:
+
 ==================
 ==================
  Monitoring Guide
  Monitoring Guide
 ==================
 ==================
@@ -12,10 +14,13 @@ There are several tools available to monitor and inspect Celery clusters.
 This document describes some of these, as as well as
 This document describes some of these, as as well as
 features related to monitoring, like events and broadcast commands.
 features related to monitoring, like events and broadcast commands.
 
 
+.. _monitoring-workers:
 
 
 Monitoring and Inspecting Workers
 Monitoring and Inspecting Workers
 =================================
 =================================
 
 
+.. _monitoring-celeryctl:
+
 celeryctl
 celeryctl
 ---------
 ---------
 
 
@@ -96,21 +101,30 @@ You can specify a single, or a list of workers by using the
        You may have to increase this timeout If you're getting empty responses
        You may have to increase this timeout If you're getting empty responses
        due to latency.
        due to latency.
 
 
+
+.. _monitoring-django-admin:
+
 Django Admin
 Django Admin
 ------------
 ------------
 
 
 TODO
 TODO
 
 
+.. _monitoring-celeryev:
+
 celeryev
 celeryev
 --------
 --------
 
 
 TODO
 TODO
 
 
+.. _monitoring-celerymon:
+
 celerymon
 celerymon
 ---------
 ---------
 
 
 TODO
 TODO
 
 
+.. _monitoring-rabbitmq:
+
 Monitoring and inspecting RabbitMQ
 Monitoring and inspecting RabbitMQ
 ==================================
 ==================================
 
 
@@ -130,6 +144,8 @@ as manage users, virtual hosts and their permissions.
 
 
 .. _`rabbitmqctl(1)`: http://www.rabbitmq.com/man/rabbitmqctl.1.man.html
 .. _`rabbitmqctl(1)`: http://www.rabbitmq.com/man/rabbitmqctl.1.man.html
 
 
+.. _monitoring-rmq-queues:
+
 Inspecting queues
 Inspecting queues
 -----------------
 -----------------
 
 
@@ -158,6 +174,9 @@ Finding the amount of memory allocated to a queue::
 :Tip: Adding the ``-q`` option to `rabbitmqctl(1)`_ makes the output
 :Tip: Adding the ``-q`` option to `rabbitmqctl(1)`_ makes the output
       easier to parse.
       easier to parse.
 
 
+
+.. _monitoring-munin:
+
 Munin
 Munin
 =====
 =====
 
 
@@ -178,6 +197,9 @@ maintaining a Celery cluster.
 
 
     http://exchange.munin-monitoring.org/plugins/celery_tasks/details
     http://exchange.munin-monitoring.org/plugins/celery_tasks/details
 
 
+
+.. _monitoring-events:
+
 Events
 Events
 ======
 ======
 
 
@@ -185,15 +207,17 @@ The worker has the ability to send a message whenever some event
 happens. These events are then captured by tools like ``celerymon`` and 
 happens. These events are then captured by tools like ``celerymon`` and 
 ``celeryev`` to monitor the cluster.
 ``celeryev`` to monitor the cluster.
 
 
+.. _monitoring-snapshots:
+
 Snapshots
 Snapshots
 ---------
 ---------
 
 
 Even a single worker can produce a huge amount of events, so storing
 Even a single worker can produce a huge amount of events, so storing
-the history of these events on disk may be hard.
+history of events on disk may be very expensive.
 
 
 A sequence of events describes the cluster state in that time period,
 A sequence of events describes the cluster state in that time period,
-by taking periodic snapshots of this state we can capture all interesting
-information, but only periodically write it to disk.
+by taking periodic snapshots of this state we can keep all history, but
+still only periodically write it to disk.
 
 
 To take snapshots you need a Camera class, with this you can define
 To take snapshots you need a Camera class, with this you can define
 what should happen every time the state is captured. You can
 what should happen every time the state is captured. You can
@@ -205,10 +229,13 @@ camera ``myapp.Camera`` you run ``celeryev`` with the following arguments::
 
 
     $ celeryev -c myapp.Camera --frequency=2.0
     $ celeryev -c myapp.Camera --frequency=2.0
 
 
+
+.. _monitoring-camera:
+
 Custom Camera
 Custom Camera
 ~~~~~~~~~~~~~
 ~~~~~~~~~~~~~
 
 
-Here is an example camera that is simply dumping the snapshot to the screen:
+Here is an example camera, dumping the snapshot to the screen:
 
 
 .. code-block:: python
 .. code-block:: python
 
 
@@ -249,11 +276,16 @@ Or you can use it programatically like this::
     if __name__ == "__main__":
     if __name__ == "__main__":
         main()
         main()
 
 
+
+.. _event-reference:
+
 Event Reference
 Event Reference
 ---------------
 ---------------
 
 
 This list contains the events sent by the worker, and their arguments.
 This list contains the events sent by the worker, and their arguments.
 
 
+.. _event-reference-task:
+
 Task Events
 Task Events
 ~~~~~~~~~~~
 ~~~~~~~~~~~
 
 
@@ -287,6 +319,8 @@ Task Events
     Sent if the task failed, but will be retried in the future.
     Sent if the task failed, but will be retried in the future.
     (**NOT IMPLEMENTED**)
     (**NOT IMPLEMENTED**)
 
 
+.. _event-reference-worker:
+
 Worker Events
 Worker Events
 ~~~~~~~~~~~~~
 ~~~~~~~~~~~~~
 
 

+ 12 - 0
docs/userguide/periodic-tasks.rst

@@ -1,3 +1,5 @@
+.. _guide-beat:
+
 ================
 ================
  Periodic Tasks
  Periodic Tasks
 ================
 ================
@@ -20,6 +22,8 @@ at a time, otherwise you would end up with duplicate tasks. Using
 a centralized approach means the schedule does not have to be synchronized,
 a centralized approach means the schedule does not have to be synchronized,
 and the service can operate without using locks.
 and the service can operate without using locks.
 
 
+.. _beat-entries:
+
 Entries
 Entries
 =======
 =======
 
 
@@ -46,6 +50,8 @@ Using a :class:`~datetime.timedelta` means the task will be executed
 after the last run. A crontab like schedule also exists, see the section
 after the last run. A crontab like schedule also exists, see the section
 on `Crontab schedules`_.
 on `Crontab schedules`_.
 
 
+.. _beat-entry-fields:
+
 Available Fields
 Available Fields
 ----------------
 ----------------
 
 
@@ -86,6 +92,8 @@ Available Fields
     If ``relative`` is true the frequency is not rounded and will be
     If ``relative`` is true the frequency is not rounded and will be
     relative to the time ``celerybeat`` was started.
     relative to the time ``celerybeat`` was started.
 
 
+.. _beat-crontab:
+
 Crontab schedules
 Crontab schedules
 =================
 =================
 
 
@@ -148,6 +156,8 @@ The syntax of these crontab expressions are very flexible.  Some examples:
 |                                     | every hour during office hours (8am-5pm).  |
 |                                     | every hour during office hours (8am-5pm).  |
 +-------------------------------------+--------------------------------------------+
 +-------------------------------------+--------------------------------------------+
 
 
+.. _beat-starting:
+
 Starting celerybeat
 Starting celerybeat
 ===================
 ===================
 
 
@@ -167,6 +177,8 @@ location for this file::
 
 
     $ celerybeat -s /home/celery/var/run/celerybeat-schedule
     $ celerybeat -s /home/celery/var/run/celerybeat-schedule
 
 
+.. _beat-custom-schedulers:
+
 Using custom scheduler classes
 Using custom scheduler classes
 ------------------------------
 ------------------------------
 
 

+ 11 - 0
docs/userguide/remote-tasks.rst

@@ -1,3 +1,5 @@
+.. _guide-webhooks:
+
 ================================
 ================================
  HTTP Callback Tasks (Webhooks)
  HTTP Callback Tasks (Webhooks)
 ================================
 ================================
@@ -7,6 +9,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _webhook-basics:
+
 Basics
 Basics
 ======
 ======
 
 
@@ -34,6 +38,9 @@ or if there was an error::
 
 
     {"status": "failure": "reason": "Invalid moon alignment."}
     {"status": "failure": "reason": "Invalid moon alignment."}
 
 
+
+.. _webhook-django-example:
+
 Django webhook example
 Django webhook example
 ======================
 ======================
 
 
@@ -52,6 +59,8 @@ With this information you could define a simple task in Django:
         response = {"status": "success", "retval": result}
         response = {"status": "success", "retval": result}
         return HttpResponse(serialize(response), mimetype="application/json")
         return HttpResponse(serialize(response), mimetype="application/json")
 
 
+.. _webhook-rails-example:
+
 Ruby on Rails webhook example
 Ruby on Rails webhook example
 =============================
 =============================
 
 
@@ -71,6 +80,8 @@ or in Ruby on Rails:
 You can easily port this scheme to any language/framework;
 You can easily port this scheme to any language/framework;
 new examples and libraries are very welcome.
 new examples and libraries are very welcome.
 
 
+.. _webhook-executing:
+
 Executing webhook tasks
 Executing webhook tasks
 =======================
 =======================
 
 

+ 44 - 3
docs/userguide/routing.rst

@@ -1,3 +1,5 @@
+.. _guide-routing:
+
 ===============
 ===============
  Routing Tasks
  Routing Tasks
 ===============
 ===============
@@ -11,9 +13,14 @@ respective documenation for more information, or contact the `mailinglist`_.
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+
+.. _routing-basics:
+
 Basics
 Basics
 ======
 ======
 
 
+.. _routing-automatic:
+
 Automatic routing
 Automatic routing
 -----------------
 -----------------
 
 
@@ -43,6 +50,8 @@ process the default queue as well::
 
 
     (z)$ celeryd -Q feeds,celery
     (z)$ celeryd -Q feeds,celery
 
 
+.. _routing-changing-default-queue:
+
 Changing the name of the default queue
 Changing the name of the default queue
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -55,6 +64,8 @@ configuration:
                                  "binding_key": "default"}}
                                  "binding_key": "default"}}
     CELERY_DEFAULT_QUEUE = "default"
     CELERY_DEFAULT_QUEUE = "default"
 
 
+.. _routing-autoqueue-details:
+
 How the queues are defined
 How the queues are defined
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -74,6 +85,8 @@ The non-AMQP backends like ``ghettoq`` does not support exchanges, so they
 require the exchange to have the same name as the queue. Using this design
 require the exchange to have the same name as the queue. Using this design
 ensures it will work for them as well.
 ensures it will work for them as well.
 
 
+.. _routing-manual:
+
 Manual routing
 Manual routing
 --------------
 --------------
 
 
@@ -158,7 +171,7 @@ just specify a custom exchange and exchange type:
 
 
 If you're confused about these terms, you should read up on AMQP concepts.
 If you're confused about these terms, you should read up on AMQP concepts.
 
 
-In addition to the :ref:`AMQP Primer` below, there's
+In addition to the :ref:`amqp-primer` below, there's
 `Rabbits and Warrens`_, an excellent blog post describing queues and
 `Rabbits and Warrens`_, an excellent blog post describing queues and
 exchanges. There's also AMQP in 10 minutes*: `Flexible Routing Model`_,
 exchanges. There's also AMQP in 10 minutes*: `Flexible Routing Model`_,
 and `Standard Exchange Types`_. For users of RabbitMQ the `RabbitMQ FAQ`_
 and `Standard Exchange Types`_. For users of RabbitMQ the `RabbitMQ FAQ`_
@@ -169,7 +182,7 @@ could be useful as a source of information.
 .. _`Standard Exchange Types`: http://bit.ly/EEWca
 .. _`Standard Exchange Types`: http://bit.ly/EEWca
 .. _`RabbitMQ FAQ`: http://www.rabbitmq.com/faq.html
 .. _`RabbitMQ FAQ`: http://www.rabbitmq.com/faq.html
 
 
-.. _`AMQP Primer`:
+.. _amqp-primer:
 
 
 AMQP Primer
 AMQP Primer
 ===========
 ===========
@@ -193,6 +206,8 @@ This is an example task message represented as a Python dictionary:
      "args": [4, 4],
      "args": [4, 4],
      "kwargs": {}}
      "kwargs": {}}
 
 
+.. _amqp-producers-consumers-brokers:
+
 Producers, consumers and brokers
 Producers, consumers and brokers
 --------------------------------
 --------------------------------
 
 
@@ -205,6 +220,8 @@ to consumers.
 
 
 You are likely to see these terms used a lot in AMQP related material.
 You are likely to see these terms used a lot in AMQP related material.
 
 
+.. _amqp-exchanges-queues-keys:
+
 Exchanges, queues and routing keys.
 Exchanges, queues and routing keys.
 -----------------------------------
 -----------------------------------
 
 
@@ -251,6 +268,8 @@ One for video, one for images and finally, one default queue for everything else
 while ``binding_key`` is the key the queue is bound with. In the AMQP API
 while ``binding_key`` is the key the queue is bound with. In the AMQP API
 they are both referred to as the routing key.
 they are both referred to as the routing key.
 
 
+.. _amqp-exchange-types:
+
 Exchange types
 Exchange types
 --------------
 --------------
 
 
@@ -263,12 +282,16 @@ Bridgen.
 .. _`last-value-cache plug-in`:
 .. _`last-value-cache plug-in`:
     http://github.com/squaremo/rabbitmq-lvc-plugin
     http://github.com/squaremo/rabbitmq-lvc-plugin
 
 
+.. _amqp-exchange-type-direct:
+
 Direct exchanges
 Direct exchanges
 ~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~
 
 
 Direct exchanges match by exact routing keys, so a queue bound with
 Direct exchanges match by exact routing keys, so a queue bound with
 the routing key ``video`` only receives messages with the same routing key.
 the routing key ``video`` only receives messages with the same routing key.
 
 
+.. _amqp-exchange-type-topic:
+
 Topic exchanges
 Topic exchanges
 ~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~
 
 
@@ -280,10 +303,13 @@ With routing keys like ``usa.news``, ``usa.weather``, ``norway.news`` and
 ``norway.weather``, bindings could be ``*.news`` (all news), ``usa.#`` (all
 ``norway.weather``, bindings could be ``*.news`` (all news), ``usa.#`` (all
 items in the USA) or ``usa.weather`` (all USA weather items).
 items in the USA) or ``usa.weather`` (all USA weather items).
 
 
+.. _amqp-api:
 
 
 Related API commands
 Related API commands
 --------------------
 --------------------
 
 
+.. _amqp-api-exchange-declare:
+
 exchange.declare(exchange_name, type, passive, durable, auto_delete, internal)
 exchange.declare(exchange_name, type, passive, durable, auto_delete, internal)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -297,6 +323,8 @@ Declares an exchange by name.
 * ``auto_delete`` means the queue will be deleted by the broker when there
 * ``auto_delete`` means the queue will be deleted by the broker when there
   are no more queues using it.
   are no more queues using it.
 
 
+.. _amqp-api-queue-declare:
+
 queue.declare(queue_name, passive, durable, exclusive, auto_delete)
 queue.declare(queue_name, passive, durable, exclusive, auto_delete)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -305,17 +333,23 @@ Declares a queue by name.
 * exclusive queues can only be consumed from by the current connection.
 * exclusive queues can only be consumed from by the current connection.
   implies ``auto_delete``.
   implies ``auto_delete``.
 
 
+.. _amqp-api-queue-bind:
+
 queue.bind(queue_name, exchange_name, routing_key)
 queue.bind(queue_name, exchange_name, routing_key)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 Binds a queue to an exchange with a routing key.
 Binds a queue to an exchange with a routing key.
 Unbound queues will not receive messages, so this is necessary.
 Unbound queues will not receive messages, so this is necessary.
 
 
+.. _amqp-api-queue-delete:
+
 queue.delete(name, if_unused, if_empty)
 queue.delete(name, if_unused, if_empty)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
 Deletes a queue and its binding.
 Deletes a queue and its binding.
 
 
+.. _amqp-api-exchange-delete:
+
 exchange.delete(name, if_unused)
 exchange.delete(name, if_unused)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 
@@ -326,6 +360,8 @@ Deletes an exchange.
 whom should initially create the exchange/queue/binding, whether consumer
 whom should initially create the exchange/queue/binding, whether consumer
 or producer. Usually the first one to need it will be the one to create it.
 or producer. Usually the first one to need it will be the one to create it.
 
 
+.. _amqp-api-hands-on:
+
 Hands-on with the API
 Hands-on with the API
 ---------------------
 ---------------------
 
 
@@ -367,7 +403,6 @@ using the ``basic.publish`` command::
     4> basic.publish "This is a message!" testexchange testkey
     4> basic.publish "This is a message!" testexchange testkey
     ok.
     ok.
 
 
-
 Now that the message is sent we can retrieve it again. We use the
 Now that the message is sent we can retrieve it again. We use the
 ``basic.get`` command here, which pops a single message off the queue,
 ``basic.get`` command here, which pops a single message off the queue,
 this command is not recommended for production as it implies polling, any
 this command is not recommended for production as it implies polling, any
@@ -408,9 +443,13 @@ To clean up after our test session we should delete the entities we created::
     ok.
     ok.
 
 
 
 
+.. _routing-tasks:
+
 Routing Tasks
 Routing Tasks
 =============
 =============
 
 
+.. _routing-defining-queues:
+
 Defining queues
 Defining queues
 ---------------
 ---------------
 
 
@@ -448,6 +487,8 @@ The default exchange, exchange type and routing key will be used as the
 default routing values for tasks, and as the default values for entries
 default routing values for tasks, and as the default values for entries
 in ``CELERY_QUEUES``.
 in ``CELERY_QUEUES``.
 
 
+.. _routing-task-destination:
+
 Specifying task destination
 Specifying task destination
 ---------------------------
 ---------------------------
 
 

+ 36 - 0
docs/userguide/tasks.rst

@@ -1,3 +1,5 @@
+.. _guide-tasks:
+
 =======
 =======
  Tasks
  Tasks
 =======
 =======
@@ -7,6 +9,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _task-basics:
+
 Basics
 Basics
 ======
 ======
 
 
@@ -43,6 +47,7 @@ The task decorator takes the same execution options as the
     def create_user(username, password):
     def create_user(username, password):
         User.objects.create(username=username, password=password)
         User.objects.create(username=username, password=password)
 
 
+.. _task-keyword-arguments:
 
 
 Default keyword arguments
 Default keyword arguments
 =========================
 =========================
@@ -91,6 +96,7 @@ The current default keyword arguments are:
   **NOTE** As some messaging backends doesn't have advanced routing
   **NOTE** As some messaging backends doesn't have advanced routing
   capabilities, you can't trust the availability of keys in this mapping.
   capabilities, you can't trust the availability of keys in this mapping.
 
 
+.. _task-logging:
 
 
 Logging
 Logging
 =======
 =======
@@ -123,6 +129,7 @@ setting decides whether or not they will be written to the log file.
 Of course, you can also simply use ``print`` as anything written to standard
 Of course, you can also simply use ``print`` as anything written to standard
 out/-err will be written to the logfile as well.
 out/-err will be written to the logfile as well.
 
 
+.. _task-retry:
 
 
 Retrying a task if something fails
 Retrying a task if something fails
 ==================================
 ==================================
@@ -155,6 +162,8 @@ passed on to the task. In addition, it also uses the ``task_id`` keyword
 argument to use the same task id, and ``delivery_info`` to route the
 argument to use the same task id, and ``delivery_info`` to route the
 retried task to the same destination.
 retried task to the same destination.
 
 
+.. _task-retry-custom-delay:
+
 Using a custom retry delay
 Using a custom retry delay
 --------------------------
 --------------------------
 
 
@@ -180,6 +189,7 @@ You can also provide the ``countdown`` argument to
                                          # - retry in 1 minute
                                          # - retry in 1 minute
 
 
 
 
+.. _task-options:
 
 
 Task options
 Task options
 ============
 ============
@@ -246,6 +256,8 @@ Task options
 
 
     Please see :doc:`executing` for more information.
     Please see :doc:`executing` for more information.
 
 
+.. _task-message-options:
+
 Message and routing options
 Message and routing options
 ---------------------------
 ---------------------------
 
 
@@ -282,6 +294,8 @@ Message and routing options
 See :doc:`executing` for more information about the messaging options
 See :doc:`executing` for more information about the messaging options
 available, also :doc:`routing`.
 available, also :doc:`routing`.
 
 
+.. _task-example:
+
 Example
 Example
 =======
 =======
 
 
@@ -323,6 +337,8 @@ The comment model looks like this:
 In the view where the comment is posted, we first write the comment
 In the view where the comment is posted, we first write the comment
 to the database, then we launch the spam filter task in the background.
 to the database, then we launch the spam filter task in the background.
 
 
+.. _task-example-blog-views:
+
 blog/views.py
 blog/views.py
 -------------
 -------------
 
 
@@ -370,6 +386,8 @@ need to pay. You have to sign up to their service to get an API key.
 To make API calls to `Akismet`_ we use the `akismet.py`_ library written by
 To make API calls to `Akismet`_ we use the `akismet.py`_ library written by
 Michael Foord.
 Michael Foord.
 
 
+.. _task-example-blog-tasks:
+
 blog/tasks.py
 blog/tasks.py
 -------------
 -------------
 
 
@@ -409,6 +427,8 @@ blog/tasks.py
 .. _`Akismet`: http://akismet.com/faq/
 .. _`Akismet`: http://akismet.com/faq/
 .. _`akismet.py`: http://www.voidspace.org.uk/downloads/akismet.py
 .. _`akismet.py`: http://www.voidspace.org.uk/downloads/akismet.py
 
 
+.. _task-how-they-work:
+
 How it works
 How it works
 ============
 ============
 
 
@@ -463,9 +483,13 @@ This means that your workers should always be updated with the same software
 as the client. This is a drawback, but the alternative is a technical
 as the client. This is a drawback, but the alternative is a technical
 challenge that has yet to be solved.
 challenge that has yet to be solved.
 
 
+.. _task-best-practices:
+
 Tips and Best Practices
 Tips and Best Practices
 =======================
 =======================
 
 
+.. _task-ignore_results:
+
 Ignore results you don't want
 Ignore results you don't want
 -----------------------------
 -----------------------------
 
 
@@ -482,6 +506,8 @@ wastes time and resources.
 Results can even be disabled globally using the ``CELERY_IGNORE_RESULT``
 Results can even be disabled globally using the ``CELERY_IGNORE_RESULT``
 setting.
 setting.
 
 
+.. _task-disable-rate-limits:
+
 Disable rate limits if they're not used
 Disable rate limits if they're not used
 ---------------------------------------
 ---------------------------------------
 
 
@@ -496,6 +522,8 @@ rate limits:
 
 
     CELERY_DISABLE_RATE_LIMITS = True
     CELERY_DISABLE_RATE_LIMITS = True
 
 
+.. _task-synchronous-subtasks:
+
 Avoid launching synchronous subtasks
 Avoid launching synchronous subtasks
 ------------------------------------
 ------------------------------------
 
 
@@ -564,10 +592,13 @@ subclass of dict used to wrap the arguments and execution options
 for a single task invocation. See :doc:`tasksets` for more information about
 for a single task invocation. See :doc:`tasksets` for more information about
 subtasks.
 subtasks.
 
 
+.. _task-performance-and-strategies:
 
 
 Performance and Strategies
 Performance and Strategies
 ==========================
 ==========================
 
 
+.. _task-granularity:
+
 Granularity
 Granularity
 -----------
 -----------
 
 
@@ -587,6 +618,8 @@ granularity.
 
 
 .. _`Art of Concurrency`: http://oreilly.com/catalog/9780596521547
 .. _`Art of Concurrency`: http://oreilly.com/catalog/9780596521547
 
 
+.. _task-data-locality:
+
 Data locality
 Data locality
 -------------
 -------------
 
 
@@ -606,6 +639,7 @@ http://research.microsoft.com/pubs/70001/tr-2003-24.pdf
 
 
 .. _`memcached`: http://memcached.org/
 .. _`memcached`: http://memcached.org/
 
 
+.. _task-state:
 
 
 State
 State
 -----
 -----
@@ -659,6 +693,8 @@ re-fetch the article in the task body:
 There might even be performance benefits to this approach, as sending large
 There might even be performance benefits to this approach, as sending large
 messages may be expensive.
 messages may be expensive.
 
 
+.. _task-database-transactions:
+
 Database transactions
 Database transactions
 ---------------------
 ---------------------
 
 

+ 9 - 0
docs/userguide/tasksets.rst

@@ -1,3 +1,5 @@
+.. _guide-sets:
+
 =======================================
 =======================================
  Sets of tasks, Subtasks and Callbacks
  Sets of tasks, Subtasks and Callbacks
 =======================================
 =======================================
@@ -5,6 +7,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _sets-subtasks:
+
 Subtasks
 Subtasks
 ========
 ========
 
 
@@ -29,6 +33,8 @@ Also it can be regarded as a type, as the following usage works::
 
 
 This makes it excellent as a means to pass callbacks around to tasks.
 This makes it excellent as a means to pass callbacks around to tasks.
 
 
+.. _sets-callbacks:
+
 Callbacks
 Callbacks
 ---------
 ---------
 
 
@@ -67,6 +73,8 @@ Now let's execute our new ``add`` task with a callback::
 As expected this will first launch one task calculating ``2 + 2``, then 
 As expected this will first launch one task calculating ``2 + 2``, then 
 another task calculating ``4 + 8``.
 another task calculating ``4 + 8``.
 
 
+.. _sets-taskset:
+
 Task Sets
 Task Sets
 =========
 =========
 
 
@@ -95,6 +103,7 @@ A task set takes a list of :class:`~celery.task.sets.subtask`'s::
     >>> result.join()
     >>> result.join()
     [4, 8, 16, 32, 64]
     [4, 8, 16, 32, 64]
 
 
+.. _sets-results:
 
 
 Results
 Results
 -------
 -------

+ 35 - 0
docs/userguide/workers.rst

@@ -1,3 +1,5 @@
+.. _guide-worker:
+
 ===============
 ===============
  Workers Guide
  Workers Guide
 ===============
 ===============
@@ -5,6 +7,8 @@
 .. contents::
 .. contents::
     :local:
     :local:
 
 
+.. _worker-starting:
+
 Starting the worker
 Starting the worker
 ===================
 ===================
 
 
@@ -29,6 +33,8 @@ hostname with the ``--hostname|-n`` argument::
     $ celeryd --loglevel=INFO --concurrency=10 -n worker2.example.com
     $ celeryd --loglevel=INFO --concurrency=10 -n worker2.example.com
     $ celeryd --loglevel=INFO --concurrency=10 -n worker3.example.com
     $ celeryd --loglevel=INFO --concurrency=10 -n worker3.example.com
 
 
+.. _worker-stopping:
+
 Stopping the worker
 Stopping the worker
 ===================
 ===================
 
 
@@ -51,6 +57,8 @@ command usually does the trick::
 
 
     $ ps auxww | grep celeryd | awk '{print $2}' | xargs kill -9
     $ ps auxww | grep celeryd | awk '{print $2}' | xargs kill -9
 
 
+.. _worker-restarting:
+
 Restarting the worker
 Restarting the worker
 =====================
 =====================
 
 
@@ -62,6 +70,8 @@ restart the worker using the ``HUP`` signal::
 The worker will then replace itself with a new instance using the same
 The worker will then replace itself with a new instance using the same
 arguments as it was started with.
 arguments as it was started with.
 
 
+.. _worker-concurrency:
+
 Concurrency
 Concurrency
 ===========
 ===========
 
 
@@ -77,6 +87,8 @@ may perform better than having a single worker. For example 3 celeryd's with
 works best for you as this varies based on application, work load, task
 works best for you as this varies based on application, work load, task
 run times and other factors.
 run times and other factors.
 
 
+.. _worker-time-limits:
+
 Time limits
 Time limits
 ===========
 ===========
 
 
@@ -108,6 +120,7 @@ Time limits can also be set using the ``CELERYD_TASK_TIME_LIMIT`` /
 
 
 **NOTE** Time limits does not currently work on Windows.
 **NOTE** Time limits does not currently work on Windows.
 
 
+.. _worker-maxtasksperchild:
 
 
 Max tasks per child setting
 Max tasks per child setting
 ===========================
 ===========================
@@ -121,6 +134,8 @@ for example from closed source C extensions.
 The option can be set using the ``--maxtasksperchild`` argument
 The option can be set using the ``--maxtasksperchild`` argument
 to ``celeryd`` or using the ``CELERYD_MAX_TASKS_PER_CHILD`` setting.
 to ``celeryd`` or using the ``CELERYD_MAX_TASKS_PER_CHILD`` setting.
 
 
+.. _worker-remote-control:
+
 Remote control
 Remote control
 ==============
 ==============
 
 
@@ -142,6 +157,8 @@ In addition to timeouts, the client can specify the maximum number
 of replies to wait for. If a destination is specified this limit is set
 of replies to wait for. If a destination is specified this limit is set
 to the number of destination hosts.
 to the number of destination hosts.
 
 
+.. _worker-broadcast-fun:
+
 The :func:`~celery.task.control.broadcast` function.
 The :func:`~celery.task.control.broadcast` function.
 ----------------------------------------------------
 ----------------------------------------------------
 
 
@@ -179,6 +196,8 @@ Of course, using the higher-level interface to set rate limits is much
 more convenient, but there are commands that can only be requested
 more convenient, but there are commands that can only be requested
 using :func:`~celery.task.control.broadcast`.
 using :func:`~celery.task.control.broadcast`.
 
 
+.. _worker-rate-limits:
+
 Rate limits
 Rate limits
 -----------
 -----------
 
 
@@ -197,6 +216,7 @@ destination hostname::
 **NOTE** This won't affect workers with the ``CELERY_DISABLE_RATE_LIMITS``
 **NOTE** This won't affect workers with the ``CELERY_DISABLE_RATE_LIMITS``
 setting on. To re-enable rate limits then you have to restart the worker.
 setting on. To re-enable rate limits then you have to restart the worker.
 
 
+.. _worker-remote-shutdown:
 
 
 Remote shutdown
 Remote shutdown
 ---------------
 ---------------
@@ -206,6 +226,8 @@ This command will gracefully shut down the worker remotely::
     >>> broadcast("shutdown") # shutdown all workers
     >>> broadcast("shutdown") # shutdown all workers
     >>> broadcast("shutdown, destination="worker1.example.com")
     >>> broadcast("shutdown, destination="worker1.example.com")
 
 
+.. _worker-ping:
+
 Ping
 Ping
 ----
 ----
 
 
@@ -227,6 +249,8 @@ so you can specify which workers to ping::
     [{'worker2.example.com': 'pong'},
     [{'worker2.example.com': 'pong'},
      {'worker3.example.com': 'pong'}]
      {'worker3.example.com': 'pong'}]
 
 
+.. _worker-enable-events:
+
 Enable/disable events
 Enable/disable events
 ---------------------
 ---------------------
 
 
@@ -237,6 +261,8 @@ a worker using celeryev/celerymon.
     >>> broadcast("enable_events")
     >>> broadcast("enable_events")
     >>> broadcast("disable_events")
     >>> broadcast("disable_events")
 
 
+.. _worker-custom-control-commands:
+
 Writing your own remote control commands
 Writing your own remote control commands
 ----------------------------------------
 ----------------------------------------
 
 
@@ -264,6 +290,8 @@ then import them using the ``CELERY_IMPORTS`` setting::
 
 
     CELERY_IMPORTS = ("myapp.worker.control", )
     CELERY_IMPORTS = ("myapp.worker.control", )
 
 
+.. _worker-inspect:
+
 Inspecting workers
 Inspecting workers
 ==================
 ==================
 
 
@@ -284,6 +312,8 @@ remote control commands under the hood.
     >>> i = inspect("worker1.example.com")
     >>> i = inspect("worker1.example.com")
 
 
 
 
+.. _worker-inspect-registered-tasks:
+
 Dump of registered tasks
 Dump of registered tasks
 ------------------------
 ------------------------
 
 
@@ -299,6 +329,8 @@ You can get a list of tasks registered in the worker using the
                               'tasks.add',
                               'tasks.add',
                               'tasks.sleeptask']}]
                               'tasks.sleeptask']}]
 
 
+.. _worker-inspect-active-tasks:
+
 Dump of currently executing tasks
 Dump of currently executing tasks
 ---------------------------------
 ---------------------------------
 
 
@@ -312,6 +344,7 @@ You can get a list of active tasks using
           "args": "(8,)",
           "args": "(8,)",
           "kwargs": "{}"}]}]
           "kwargs": "{}"}]}]
 
 
+.. _worker-inspect-eta-schedule:
 
 
 Dump of scheduled (ETA) tasks
 Dump of scheduled (ETA) tasks
 -----------------------------
 -----------------------------
@@ -336,6 +369,8 @@ You can get a list of tasks waiting to be scheduled by using
 
 
 Note that these are tasks with an eta/countdown argument, not periodic tasks.
 Note that these are tasks with an eta/countdown argument, not periodic tasks.
 
 
+.. _worker-inspect-reserved:
+
 Dump of reserved tasks
 Dump of reserved tasks
 ----------------------
 ----------------------
 
 

部分文件因文件數量過多而無法顯示