Skip to content

Commit

Permalink
Removes any reference to django-celery in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ask committed Aug 4, 2016
1 parent c540ef7 commit 3a2ea72
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 138 deletions.
62 changes: 42 additions & 20 deletions CONTRIBUTING.rst
Expand Up @@ -249,7 +249,8 @@ issue tracker.
* ``amqp``: https://github.com/celery/py-amqp/issues
* ``vine``: https://github.com/celery/vine/issues
* ``librabbitmq``: https://github.com/celery/librabbitmq/issues
* ``django-celery``: https://github.com/celery/django-celery/issues
* ``django-celery-beat``: https://github.com/celery/django-celery-beat/issues
* ``django-celery-results``: https://github.com/celery/django-celery-results/issues

If you're unsure of the origin of the bug you can ask the
`mailing-list`_, or just use the Celery issue tracker.
Expand Down Expand Up @@ -325,9 +326,10 @@ The master branch is where development of the next version happens.
Maintenance branches
--------------------

Maintenance branches are named after the version, e.g. the maintenance branch
for the 2.2.x series is named ``2.2``. Previously these were named
``releaseXX-maint``.
Maintenance branches are named after the version -- for example,
the maintenance branch for the 2.2.x series is named ``2.2``.

Previously these were named ``releaseXX-maint``.

The versions we currently maintain is:

Expand Down Expand Up @@ -373,10 +375,13 @@ Feature branches are removed once they've been merged into a release branch.
Tags
====

Tags are used exclusively for tagging releases. A release tag is
named with the format ``vX.Y.Z``, e.g. ``v2.3.1``.
Experimental releases contain an additional identifier ``vX.Y.Z-id``, e.g.
``v3.0.0-rc1``. Experimental tags may be removed after the official release.
- Tags are used exclusively for tagging releases. A release tag is
named with the format ``vX.Y.Z`` -- for example ``v2.3.1``.

- Experimental releases contain an additional identifier ``vX.Y.Z-id`` --
for example ``v3.0.0-rc1``.

- Experimental tags may be removed after the official release.

.. _contributing-changes:

Expand Down Expand Up @@ -784,7 +789,7 @@ that require third-party libraries must be added.

1) Add a new requirements file in `requirements/extras`

E.g. for the Cassandra backend this is
For the Cassandra backend this is
``requirements/extras/cassandra.txt``, and the file looks like this:
::

Expand Down Expand Up @@ -959,6 +964,26 @@ that'll eventually be merged into the Python stdlib.
:Windows-CI: https://ci.appveyor.com/project/ask/billiard
:PyPI: ``billiard``

``django-celery-beat``
----------------------

Database-backed Periodic Tasks with admin interface using the Django ORM.

:git: https://github.com/celery/django-celery-beat
:CI: http://travis-ci.org/#!/celery/django-celery-beat
:Windows-CI: https://ci.appveyor.com/project/ask/django-celery-beat
:PyPI: ``django-celery-beat``

``django-celery-results``
-------------------------

Store task results in the Django ORM, or using the Django Cache Framework.

:git: https://github.com/celery/django-celery-results
:CI: http://travis-ci.org/#!/celery/django-celery-results
:Windows-CI: https://ci.appveyor.com/project/ask/django-celery-results
:PyPI: ``django-celery-results``

``librabbitmq``
---------------

Expand All @@ -967,15 +992,6 @@ Very fast Python AMQP client written in C.
:git: https://github.com/celery/librabbitmq
:PyPI: ``librabbitmq``

``django-celery``
-----------------

Django <-> Celery Integration.

:git: https://github.com/celery/django-celery
:PyPI: ``django-celery``
:docs: http://docs.celeryproject.org/en/latest/django

``cell``
--------

Expand All @@ -997,6 +1013,12 @@ Distributed Celery Instance manager.
Deprecated
----------

- ``django-celery``

:git: https://github.com/celery/django-celery
:PyPI: ``django-celery``
:docs: http://docs.celeryproject.org/en/latest/django

- ``Flask-Celery``

:git: https://github.com/ask/Flask-Celery
Expand Down Expand Up @@ -1086,8 +1108,8 @@ following:

* Enter "Edit project"

Change default branch to the branch of this series, e.g. ``2.4``
for series 2.4.
Change default branch to the branch of this series, for example, use
the ``2.4`` branch for the 2.4 series.

* Also add the previous version under the "versions" tab.

Expand Down
1 change: 0 additions & 1 deletion README.rst
Expand Up @@ -195,7 +195,6 @@ database connections at ``fork``.
.. _`Bottle`: http://bottlepy.org/
.. _`Pyramid`: http://docs.pylonsproject.org/en/latest/docs/pyramid.html
.. _`pyramid_celery`: http://pypi.python.org/pypi/pyramid_celery/
.. _`django-celery`: http://pypi.python.org/pypi/django-celery
.. _`celery-pylons`: http://pypi.python.org/pypi/celery-pylons
.. _`web2py-celery`: http://code.google.com/p/web2py-celery/
.. _`Tornado`: http://www.tornadoweb.org/
Expand Down
2 changes: 1 addition & 1 deletion celery/schedules.py
Expand Up @@ -116,7 +116,7 @@ def is_due(self, last_run_at):
The default max loop interval may vary for different schedulers.
For the default scheduler the value is 5 minutes, but for example
the :pypi:`django-celery` database scheduler the value
the :pypi:`django-celery-beat` database scheduler the value
is 5 seconds.
"""
last_run_at = self.maybe_make_aware(last_run_at)
Expand Down
38 changes: 28 additions & 10 deletions docs/contributing.rst
Expand Up @@ -250,7 +250,8 @@ issue tracker.
* :pypi:`amqp`: https://github.com/celery/py-amqp/issues
* :pypi:`vine`: https://github.com/celery/vine/issues
* :pypi:`librabbitmq`: https://github.com/celery/librabbitmq/issues
* :pypi:`django-celery`: https://github.com/celery/django-celery/issues
* :pypi:`django-celery-beat`: https://github.com/celery/django-celery-beat/issues
* :pypi:`django-celery-results`: https://github.com/celery/django-celery-results/issues

If you're unsure of the origin of the bug you can ask the
:ref:`mailing-list`, or just use the Celery issue tracker.
Expand Down Expand Up @@ -996,6 +997,26 @@ that'll eventually be merged into the Python stdlib.
:Windows-CI: https://ci.appveyor.com/project/ask/billiard
:PyPI: :pypi:`billiard`

``django-celery-beat``
----------------------

Database-backed Periodic Tasks with admin interface using the Django ORM.

:git: https://github.com/celery/django-celery-beat
:CI: http://travis-ci.org/#!/celery/django-celery-beat
:Windows-CI: https://ci.appveyor.com/project/ask/django-celery-beat
:PyPI: :pypi:`django-celery-beat`

``django-celery-results``
-------------------------

Store task results in the Django ORM, or using the Django Cache Framework.

:git: https://github.com/celery/django-celery-results
:CI: http://travis-ci.org/#!/celery/django-celery-results
:Windows-CI: https://ci.appveyor.com/project/ask/django-celery-results
:PyPI: :pypi:`django-celery-results`

``librabbitmq``
---------------

Expand All @@ -1004,15 +1025,6 @@ Very fast Python AMQP client written in C.
:git: https://github.com/celery/librabbitmq
:PyPI: :pypi:`librabbitmq`

``django-celery``
-----------------

Django <-> Celery Integration.

:git: https://github.com/celery/django-celery
:PyPI: :pypi:`django-celery`
:docs: http://docs.celeryproject.org/en/latest/django

``cell``
--------

Expand All @@ -1034,6 +1046,12 @@ Distributed Celery Instance manager.
Deprecated
----------

- ``django-celery``

:git: https://github.com/celery/django-celery
:PyPI: :pypi:`django-celery`
:docs: http://docs.celeryproject.org/en/latest/django

- ``Flask-Celery``

:git: https://github.com/ask/Flask-Celery
Expand Down
66 changes: 30 additions & 36 deletions docs/django/first-steps-with-django.rst
Expand Up @@ -139,65 +139,59 @@ concrete app instance:
You can find the full source code for the Django example project at:
https://github.com/celery/celery/tree/3.1/examples/django/

Using the Django ORM/Cache as a result backend
----------------------------------------------
.. admonition:: Relative Imports

The [``django-celery``](https://github.com/celery/django-celery) library defines
result backends that uses the Django ORM and Django Cache frameworks.
You have to be consistent in how you import the task module.
For example, if you have ``project.app`` in ``INSTALLED_APPS``, then you
must also import the tasks ``from project.app`` or else the names
of the tasks will end up being different.

To use this with your project you need to follow these four steps:
See :ref:`task-naming-relative-imports`

1. Install the :pypi:`django-celery` library:
Extensions
==========

.. code-block:: console
``django-celery-results`` -- Using the Django ORM/Cache as a result backend
---------------------------------------------------------------------------

$ pip install django-celery
The :pypi:`django-celery-results` extension provides result backends
using either the Django ORM, or the Django Cache framework.

2. Add ``djcelery`` to ``INSTALLED_APPS``.
To use this with your project you need to follow these steps:

3. Create the Celery database tables.
#. Install the :pypi:`django-celery-results` library:

This step will create the tables used to store results
when using the database result backend and the tables used
by the database periodic task scheduler. You can skip
this step if you don't use these.
.. code-block:: console
Create the tables by migrating your database:
$ pip install django-celery-results
.. code-block:: console
2. Add ``django_celery_results`` to ``INSTALLED_APPS``.

$ python manage.py migrate djcelery
Note that there's no dashes in this name, only underscores.

4. Configure Celery to use the :pypi:`django-celery` backend.
3. Create the Celery database tables by performing a database migrations:

For the database backend you must use:
.. code-block:: console
.. code-block:: python
$ python manage.py migrate django_celery_results
app.conf.update(
result_backend='djcelery.backends.database:DatabaseBackend',
)
4. Configure Celery to use the :pypi:`django-celery-results` backend.

For the cache backend you can use:
Assuming you are using Django's :file:`settings.py` to also configure
Celery, add the following settings:

.. code-block:: python
app.conf.update(
result_backend='djcelery.backends.cache:CacheBackend',
)
CELERY_RESULT_BACKEND = 'django_celery_results.backends:DatabaseBackend'
If you have connected Celery to your Django settings then you can
add this directly into your settings module (without the
``app.conf.update`` part)
For the cache backend you can use:

.. admonition:: Relative Imports
CELERY_RESULT_BACKEND = 'django_celery_results.backends:CacheBackend'

You have to be consistent in how you import the task module.
For example, if you have ``project.app`` in ``INSTALLED_APPS``, then you
must also import the tasks ``from project.app`` or else the names
of the tasks will end up being different.
``django-celery-beat`` -- Database-backed Periodic Tasks with Admin interface.
------------------------------------------------------------------------------

See :ref:`task-naming-relative-imports`
See :ref:`beat-custom-schedulers` for more information.

Starting the worker process
===========================
Expand Down
42 changes: 12 additions & 30 deletions docs/faq.rst
Expand Up @@ -103,14 +103,6 @@ that don't come with the multiprocessing module.

The pytz module provides timezone definitions and related tools.

``django-celery``
~~~~~~~~~~~~~~~~~

If you use :pypi:`django-celery` then you don't have to install Celery
separately, as it'll make sure that the required version is installed.

:pypi:`django-celery` doesn't have any other dependencies.

kombu
~~~~~

Expand Down Expand Up @@ -925,33 +917,23 @@ Can I run the worker in the background on [platform]?
Django
======

.. _faq-django-database-tables:

What purpose does the database tables created by ``django-celery`` have?
------------------------------------------------------------------------
.. _faq-django-beat-database-tables:

Several database tables are created by default, these relate to

* Monitoring

When you use the django-admin monitor, the cluster state is written
to the ``TaskState`` and ``WorkerState`` models.

* Periodic tasks
What purpose does the database tables created by ``django-celery-beat`` have?
-----------------------------------------------------------------------------

When the database-backed schedule is used the periodic task
schedule is taken from the ``PeriodicTask`` model, there are
also several other helper tables (``IntervalSchedule``,
``CrontabSchedule``, ``PeriodicTasks``).
When the database-backed schedule is used the periodic task
schedule is taken from the ``PeriodicTask`` model, there are
also several other helper tables (``IntervalSchedule``,
``CrontabSchedule``, ``PeriodicTasks``).

* Task results
.. _faq-django-result-database-tables:

The database result backend is enabled by default when using
:pypi:`django-celery` (this is for historical reasons, and thus for
backward compatibility).
What purpose does the database tables created by ``django-celery-results`` have?
--------------------------------------------------------------------------------

The results are stored in the ``TaskMeta`` and ``TaskSetMeta`` models.
*these tables aren't created if another result backend is configured*.
The Django database result backend extension requires
two extra models: ``TaskResult`` and ``GroupResult``.

.. _faq-windows:

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/introduction.rst
Expand Up @@ -216,8 +216,6 @@ Framework Integration
Celery is easy to integrate with web frameworks, some of them even have
integration packages:

+--------------------+------------------------+
| `Django`_ | :pypi:`django-celery` |
+--------------------+------------------------+
| `Pyramid`_ | :pypi:`pyramid_celery` |
+--------------------+------------------------+
Expand All @@ -230,6 +228,8 @@ integration packages:
| `Tornado`_ | :pypi:`tornado-celery` |
+--------------------+------------------------+

For `Django`_ see :ref:`django-first-steps`.

The integration packages aren't strictly necessary, but they can make
development easier, and sometimes they add important hooks like closing
database connections at :manpage:`fork(2)`.
Expand Down
1 change: 0 additions & 1 deletion docs/includes/introduction.txt
Expand Up @@ -187,7 +187,6 @@ database connections at ``fork``.
.. _`Bottle`: http://bottlepy.org/
.. _`Pyramid`: http://docs.pylonsproject.org/en/latest/docs/pyramid.html
.. _`pyramid_celery`: http://pypi.python.org/pypi/pyramid_celery/
.. _`django-celery`: http://pypi.python.org/pypi/django-celery
.. _`celery-pylons`: http://pypi.python.org/pypi/celery-pylons
.. _`web2py-celery`: http://code.google.com/p/web2py-celery/
.. _`Tornado`: http://www.tornadoweb.org/
Expand Down
3 changes: 1 addition & 2 deletions docs/internals/guide.rst
Expand Up @@ -245,8 +245,7 @@ Module Overview

"single-mode" uses this loader by default.

Extension loaders also exist, like :pypi:`django-celery`,
:pypi:`celery-pylons`, and so on.
Extension loaders also exist, for example :pypi:`celery-pylons`.

- celery.worker

Expand Down

0 comments on commit 3a2ea72

Please sign in to comment.