|
@@ -31,67 +31,6 @@ Removals for version 4.0
|
|
|
>>> from celery.result import result_from_tuple
|
|
|
>>> result = result_from_tuple(tup)
|
|
|
|
|
|
-.. _deprecations-v4.0:
|
|
|
-
|
|
|
-Removals for version 5.0
|
|
|
-========================
|
|
|
-
|
|
|
-Old Task API
|
|
|
-------------
|
|
|
-
|
|
|
-.. _deprecate-compat-task-modules:
|
|
|
-
|
|
|
-Compat Task Modules
|
|
|
-~~~~~~~~~~~~~~~~~~~
|
|
|
-
|
|
|
-- Module ``celery.decorators`` will be removed:
|
|
|
-
|
|
|
- Which means you need to change::
|
|
|
-
|
|
|
- from celery.decorators import task
|
|
|
-
|
|
|
-Into::
|
|
|
-
|
|
|
- from celery import task
|
|
|
-
|
|
|
-- Module ``celery.task`` *may* be removed (not decided)
|
|
|
-
|
|
|
- This means you should change::
|
|
|
-
|
|
|
- from celery.task import task
|
|
|
-
|
|
|
- into::
|
|
|
-
|
|
|
- from celery import task
|
|
|
-
|
|
|
- -- and::
|
|
|
-
|
|
|
- from celery.task import Task
|
|
|
-
|
|
|
- into::
|
|
|
-
|
|
|
- from celery import Task
|
|
|
-
|
|
|
-
|
|
|
-Note that the new :class:`~celery.Task` class no longer
|
|
|
-uses classmethods for these methods:
|
|
|
-
|
|
|
- - delay
|
|
|
- - apply_async
|
|
|
- - retry
|
|
|
- - apply
|
|
|
- - AsyncResult
|
|
|
- - subtask
|
|
|
-
|
|
|
-This also means that you can't call these methods directly
|
|
|
-on the class, but have to instantiate the task first::
|
|
|
-
|
|
|
- >>> MyTask.delay() # NO LONGER WORKS
|
|
|
-
|
|
|
-
|
|
|
- >>> MyTask().delay() # WORKS!
|
|
|
-
|
|
|
-
|
|
|
TaskSet
|
|
|
~~~~~~~
|
|
|
|
|
@@ -132,21 +71,6 @@ should be rewritten into::
|
|
|
def add(self, x, y):
|
|
|
print("My task id is {0.request.id}".format(self))
|
|
|
|
|
|
-
|
|
|
-Task attributes
|
|
|
----------------
|
|
|
-
|
|
|
-The task attributes:
|
|
|
-
|
|
|
-- ``queue``
|
|
|
-- ``exchange``
|
|
|
-- ``exchange_type``
|
|
|
-- ``routing_key``
|
|
|
-- ``delivery_mode``
|
|
|
-- ``priority``
|
|
|
-
|
|
|
-is deprecated and must be set by :setting:`task_routes` instead.
|
|
|
-
|
|
|
:mod:`celery.result`
|
|
|
--------------------
|
|
|
|
|
@@ -182,43 +106,6 @@ The :signal:`task_sent` signal will be removed in version 4.0.
|
|
|
Please use the :signal:`before_task_publish` and :signal:`after_task_publush`
|
|
|
signals instead.
|
|
|
|
|
|
-
|
|
|
-Modules to Remove
|
|
|
------------------
|
|
|
-
|
|
|
-- ``celery.execute``
|
|
|
-
|
|
|
- This module only contains ``send_task``, which must be replaced with
|
|
|
- :attr:`@send_task` instead.
|
|
|
-
|
|
|
-- ``celery.decorators``
|
|
|
-
|
|
|
- See :ref:`deprecate-compat-task-modules`
|
|
|
-
|
|
|
-- ``celery.log``
|
|
|
-
|
|
|
- Use :attr:`@log` instead.
|
|
|
-
|
|
|
-- ``celery.messaging``
|
|
|
-
|
|
|
- Use :attr:`@amqp` instead.
|
|
|
-
|
|
|
-- ``celery.registry``
|
|
|
-
|
|
|
- Use :mod:`celery.app.registry` instead.
|
|
|
-
|
|
|
-- ``celery.task.control``
|
|
|
-
|
|
|
- Use :attr:`@control` instead.
|
|
|
-
|
|
|
-- ``celery.task.schedules``
|
|
|
-
|
|
|
- Use :mod:`celery.schedules` instead.
|
|
|
-
|
|
|
-- ``celery.task.chords``
|
|
|
-
|
|
|
- Use :func:`celery.chord` instead.
|
|
|
-
|
|
|
Settings
|
|
|
--------
|
|
|
|
|
@@ -277,6 +164,119 @@ Other Settings
|
|
|
===================================== =====================================
|
|
|
|
|
|
|
|
|
+
|
|
|
+.. _deprecations-v5.0:
|
|
|
+
|
|
|
+Removals for version 5.0
|
|
|
+========================
|
|
|
+
|
|
|
+Old Task API
|
|
|
+------------
|
|
|
+
|
|
|
+.. _deprecate-compat-task-modules:
|
|
|
+
|
|
|
+Compat Task Modules
|
|
|
+~~~~~~~~~~~~~~~~~~~
|
|
|
+
|
|
|
+- Module ``celery.decorators`` will be removed:
|
|
|
+
|
|
|
+ Which means you need to change::
|
|
|
+
|
|
|
+ from celery.decorators import task
|
|
|
+
|
|
|
+Into::
|
|
|
+
|
|
|
+ from celery import task
|
|
|
+
|
|
|
+- Module ``celery.task`` *may* be removed (not decided)
|
|
|
+
|
|
|
+ This means you should change::
|
|
|
+
|
|
|
+ from celery.task import task
|
|
|
+
|
|
|
+ into::
|
|
|
+
|
|
|
+ from celery import task
|
|
|
+
|
|
|
+ -- and::
|
|
|
+
|
|
|
+ from celery.task import Task
|
|
|
+
|
|
|
+ into::
|
|
|
+
|
|
|
+ from celery import Task
|
|
|
+
|
|
|
+
|
|
|
+Note that the new :class:`~celery.Task` class no longer
|
|
|
+uses classmethods for these methods:
|
|
|
+
|
|
|
+ - delay
|
|
|
+ - apply_async
|
|
|
+ - retry
|
|
|
+ - apply
|
|
|
+ - AsyncResult
|
|
|
+ - subtask
|
|
|
+
|
|
|
+This also means that you can't call these methods directly
|
|
|
+on the class, but have to instantiate the task first::
|
|
|
+
|
|
|
+ >>> MyTask.delay() # NO LONGER WORKS
|
|
|
+
|
|
|
+
|
|
|
+ >>> MyTask().delay() # WORKS!
|
|
|
+
|
|
|
+
|
|
|
+Task attributes
|
|
|
+---------------
|
|
|
+
|
|
|
+The task attributes:
|
|
|
+
|
|
|
+- ``queue``
|
|
|
+- ``exchange``
|
|
|
+- ``exchange_type``
|
|
|
+- ``routing_key``
|
|
|
+- ``delivery_mode``
|
|
|
+- ``priority``
|
|
|
+
|
|
|
+is deprecated and must be set by :setting:`task_routes` instead.
|
|
|
+
|
|
|
+
|
|
|
+Modules to Remove
|
|
|
+-----------------
|
|
|
+
|
|
|
+- ``celery.execute``
|
|
|
+
|
|
|
+ This module only contains ``send_task``, which must be replaced with
|
|
|
+ :attr:`@send_task` instead.
|
|
|
+
|
|
|
+- ``celery.decorators``
|
|
|
+
|
|
|
+ See :ref:`deprecate-compat-task-modules`
|
|
|
+
|
|
|
+- ``celery.log``
|
|
|
+
|
|
|
+ Use :attr:`@log` instead.
|
|
|
+
|
|
|
+- ``celery.messaging``
|
|
|
+
|
|
|
+ Use :attr:`@amqp` instead.
|
|
|
+
|
|
|
+- ``celery.registry``
|
|
|
+
|
|
|
+ Use :mod:`celery.app.registry` instead.
|
|
|
+
|
|
|
+- ``celery.task.control``
|
|
|
+
|
|
|
+ Use :attr:`@control` instead.
|
|
|
+
|
|
|
+- ``celery.task.schedules``
|
|
|
+
|
|
|
+ Use :mod:`celery.schedules` instead.
|
|
|
+
|
|
|
+- ``celery.task.chords``
|
|
|
+
|
|
|
+ Use :func:`celery.chord` instead.
|
|
|
+
|
|
|
.. _deprecations-v2.0:
|
|
|
|
|
|
Removals for version 2.0
|