Download 2.3-archived PDF

Transcript
Celery Documentation, Release 2.3.5
• The following functions have been deprecated and is scheduled for removal in version 2.3:
– celery.execute.apply_async
Use task.apply_async() instead.
– celery.execute.apply
Use task.apply() instead.
– celery.execute.delay_task
Use registry.tasks[name].delay() instead.
• Importing TaskSet from celery.task.base is now deprecated.
You should use:
>>> from celery.task import TaskSet
instead.
• New remote control commands:
– active_queues
Returns the queue declarations a worker is currently consuming from.
• Added the ability to retry publishing the task message in the event of connection loss or failure.
This is disabled by default but can be enabled using the CELERY_TASK_PUBLISH_RETRY setting,
and tweaked by the CELERY_TASK_PUBLISH_RETRY_POLICY setting.
In addition retry, and retry_policy keyword arguments have been added to Task.apply_async.
Note: Using the retry argument to apply_async requires you to handle the publisher/connection
manually.
• Periodic Task classes (@periodic_task/PeriodicTask) will not be deprecated as previously indicated in the source
code.
But you are encouraged to use the more flexible CELERYBEAT_SCHEDULE setting.
• Built-in daemonization support of celeryd using celeryd-multi is no longer experimental and is considered production quality.
See Generic init scripts if you want to use the new generic init scripts.
• Added support for message compression using the CELERY_MESSAGE_COMPRESSION setting, or the compression argument to apply_async. This can also be set using routers.
• celeryd: Now logs stacktrace of all threads when receiving the SIGUSR1 signal. (Does not work on cPython
2.4, Windows or Jython).
Inspired by https://gist.github.com/737056
• Can now remotely terminate/kill the worker process currently processing a task.
The revoke remote control command now supports a terminate argument Default signal is TERM, but
can be specified using the signal argument. Signal can be the uppercase name of any signal defined
in the signal module in the Python Standard Library.
Terminating a task also revokes it.
Example:
150
Chapter 9. Change history