Download 2.3-archived PDF

Transcript
Celery Documentation, Release 2.3.5
• multiprocessing.pool: Now handles encoding errors, so that pickling errors doesn’t crash the worker processes.
• The remote control command replies was not working with RabbitMQ 1.8.0’s stricter equivalence checks.
If you’ve already hit this problem you may have to delete the declaration:
$ camqadm exchange.delete celerycrq
or:
$ python manage.py camqadm exchange.delete celerycrq
• A bug sneaked in the ETA scheduler that made it only able to execute one task per second(!)
The scheduler sleeps between iterations so it doesn’t consume too much CPU. It keeps a list of the
scheduled items sorted by time, at each iteration it sleeps for the remaining time of the item with the
nearest deadline. If there are no eta tasks it will sleep for a minimum amount of time, one second by
default.
A bug sneaked in here, making it sleep for one second for every task that was scheduled. This has
been fixed, so now it should move tasks like hot knife through butter.
In addition a new setting has been added to control the minimum sleep interval;
CELERYD_ETA_SCHEDULER_PRECISION. A good value for this would be a float between 0
and 1, depending on the needed precision. A value of 0.8 means that when the ETA of a task is met,
it will take at most 0.8 seconds for the task to be moved to the ready queue.
• Pool: Supervisor did not release the semaphore.
This would lead to a deadlock if all workers terminated prematurely.
• Added Python version trove classifiers: 2.4, 2.5, 2.6 and 2.7
• Tests now passing on Python 2.7.
• Task.__reduce__: Tasks created using the task decorator can now be pickled.
• setup.py: nose added to tests_require.
• Pickle should now work with SQLAlchemy 0.5.x
• New homepage design by Jan Henrik Helmers: http://celeryproject.org
• New Sphinx theme by Armin Ronacher: http://docs.celeryproject.org/
• Fixed “pending_xref” errors shown in the HTML rendering of the documentation. Apparently this was caused
by new changes in Sphinx 1.0b2.
• Router classes in CELERY_ROUTES are now imported lazily.
Importing a router class in a module that also loads the Celery environment would cause a circular
dependency. This is solved by importing it when needed after the environment is set up.
• CELERY_ROUTES was broken if set to a single dict.
This example in the docs should now work again:
CELERY_ROUTES = {"feed.tasks.import_feed": "feeds"}
• CREATE_MISSING_QUEUES was not honored by apply_async.
• New remote control command: stats
Dumps information about the worker, like pool process ids, and total number of tasks executed by
type.
Example reply:
166
Chapter 9. Change history