changelog-2.3.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. .. _changelog-2.3:
  2. ===============================
  3. Change history for Celery 2.3
  4. ===============================
  5. .. contents::
  6. :local:
  7. .. _version-2.3.4:
  8. 2.3.4
  9. =====
  10. :release-date: 2011-11-25 16:00 P.M GMT
  11. :by: Ask Solem
  12. .. _v234-security-fixes:
  13. Security Fixes
  14. --------------
  15. * [Security: `CELERYSA-0001`_] Daemons would set effective id's rather than
  16. real id's when the :option:`--uid`/:option:`--gid` arguments to
  17. :program:`celery multi`, :program:`celeryd_detach`,
  18. :program:`celery beat` and :program:`celery events` were used.
  19. This means privileges weren't properly dropped, and that it would
  20. be possible to regain supervisor privileges later.
  21. .. _`CELERYSA-0001`:
  22. http://github.com/celery/celery/tree/master/docs/sec/CELERYSA-0001.txt
  23. Fixes
  24. -----
  25. * Backported fix for #455 from 2.4 to 2.3.
  26. * Statedb was not saved at shutdown.
  27. * Fixes worker sometimes hanging when hard time limit exceeded.
  28. .. _version-2.3.3:
  29. 2.3.3
  30. =====
  31. :release-date: 2011-16-09 05:00 P.M BST
  32. :by: Mher Movsisyan
  33. * Monkey patching :attr:`sys.stdout` could result in the worker
  34. crashing if the replacing object did not define :meth:`isatty`
  35. (Issue #477).
  36. * ``CELERYD`` option in :file:`/etc/default/celeryd` should not
  37. be used with generic init scripts.
  38. .. _version-2.3.2:
  39. 2.3.2
  40. =====
  41. :release-date: 2011-10-07 05:00 P.M BST
  42. .. _v232-news:
  43. News
  44. ----
  45. * Improved Contributing guide.
  46. If you'd like to contribute to Celery you should read the
  47. :ref:`Contributing Gudie <contributing>`.
  48. We are looking for contributors at all skill levels, so don't
  49. hesitate!
  50. * Now depends on Kombu 1.3.1
  51. * ``Task.request`` now contains the current worker host name (Issue #460).
  52. Available as ``task.request.hostname``.
  53. * It is now easier for app subclasses to extend how they are pickled.
  54. (see :class:`celery.app.AppPickler`).
  55. .. _v232-fixes:
  56. Fixes
  57. -----
  58. * `purge/discard_all` was not working correctly (Issue #455).
  59. * The coloring of log messages didn't handle non-ASCII data well
  60. (Issue #427).
  61. * [Windows] the multiprocessing pool tried to import ``os.kill``
  62. even though this is not available there (Issue #450).
  63. * Fixes case where the worker could become unresponsive because of tasks
  64. exceeding the hard time limit.
  65. * The :event:`task-sent` event was missing from the event reference.
  66. * ``ResultSet.iterate`` now returns results as they finish (Issue #459).
  67. This was not the case previously, even though the documentation
  68. states this was the expected behavior.
  69. * Retries will no longer be performed when tasks are called directly
  70. (using ``__call__``).
  71. Instead the exception passed to ``retry`` will be re-raised.
  72. * Eventlet no longer crashes if autoscale is enabled.
  73. growing and shrinking eventlet pools is still not supported.
  74. * py24 target removed from :file:`tox.ini`.
  75. .. _version-2.3.1:
  76. 2.3.1
  77. =====
  78. :release-date: 2011-08-07 08:00 P.M BST
  79. Fixes
  80. -----
  81. * The :setting:`CELERY_AMQP_TASK_RESULT_EXPIRES` setting did not work,
  82. resulting in an AMQP related error about not being able to serialize
  83. floats while trying to publish task states (Issue #446).
  84. .. _version-2.3.0:
  85. 2.3.0
  86. =====
  87. :release-date: 2011-08-05 12:00 P.M BST
  88. :tested: cPython: 2.5, 2.6, 2.7; PyPy: 1.5; Jython: 2.5.2
  89. .. _v230-important:
  90. Important Notes
  91. ---------------
  92. * Now requires Kombu 1.2.1
  93. * Results are now disabled by default.
  94. The AMQP backend was not a good default because often the users were
  95. not consuming the results, resulting in thousands of queues.
  96. While the queues can be configured to expire if left unused, it was not
  97. possible to enable this by default because this was only available in
  98. recent RabbitMQ versions (2.1.1+)
  99. With this change enabling a result backend will be a conscious choice,
  100. which will hopefully lead the user to read the documentation and be aware
  101. of any common pitfalls with the particular backend.
  102. The default backend is now a dummy backend
  103. (:class:`celery.backends.base.DisabledBackend`). Saving state is simply an
  104. noop operation, and AsyncResult.wait(), .result, .state, etc. will raise
  105. a :exc:`NotImplementedError` telling the user to configure the result backend.
  106. For help choosing a backend please see :ref:`task-result-backends`.
  107. If you depend on the previous default which was the AMQP backend, then
  108. you have to set this explicitly before upgrading::
  109. CELERY_RESULT_BACKEND = "amqp"
  110. .. note::
  111. For django-celery users the default backend is still ``database``,
  112. and results are not disabled by default.
  113. * The Debian init scripts have been deprecated in favor of the generic-init.d
  114. init scripts.
  115. In addition generic init scripts for celerybeat and celeryev has been
  116. added.
  117. .. _v230-news:
  118. News
  119. ----
  120. * Automatic connection pool support.
  121. The pool is used by everything that requires a broker connection. For
  122. example calling tasks, sending broadcast commands, retrieving results
  123. with the AMQP result backend, and so on.
  124. The pool is disabled by default, but you can enable it by configuring the
  125. :setting:`BROKER_POOL_LIMIT` setting::
  126. BROKER_POOL_LIMIT = 10
  127. A limit of 10 means a maximum of 10 simultaneous connections can co-exist.
  128. Only a single connection will ever be used in a single-thread
  129. environment, but in a concurrent environment (threads, greenlets, etc., but
  130. not processes) when the limit has been exceeded, any try to acquire a
  131. connection will block the thread and wait for a connection to be released.
  132. This is something to take into consideration when choosing a limit.
  133. A limit of :const:`None` or 0 means no limit, and connections will be
  134. established and closed every time.
  135. * Introducing Chords (taskset callbacks).
  136. A chord is a task that only executes after all of the tasks in a taskset
  137. has finished executing. It's a fancy term for "taskset callbacks"
  138. adopted from
  139. `Cω <http://research.microsoft.com/en-us/um/cambridge/projects/comega/>`_).
  140. It works with all result backends, but the best implementation is
  141. currently provided by the Redis result backend.
  142. Here's an example chord::
  143. >>> chord(add.subtask((i, i))
  144. ... for i in xrange(100))(tsum.subtask()).get()
  145. 9900
  146. Please read the :ref:`Chords section in the user guide <canvas-chord>`, if you
  147. want to know more.
  148. * Time limits can now be set for individual tasks.
  149. To set the soft and hard time limits for a task use the ``time_limit``
  150. and ``soft_time_limit`` attributes:
  151. .. code-block:: python
  152. import time
  153. @task(time_limit=60, soft_time_limit=30)
  154. def sleeptask(seconds):
  155. time.sleep(seconds)
  156. If the attributes are not set, then the workers default time limits
  157. will be used.
  158. New in this version you can also change the time limits for a task
  159. at runtime using the :func:`time_limit` remote control command::
  160. >>> from celery.task import control
  161. >>> control.time_limit("tasks.sleeptask",
  162. ... soft=60, hard=120, reply=True)
  163. [{'worker1.example.com': {'ok': 'time limits set successfully'}}]
  164. Only tasks that starts executing after the time limit change will be affected.
  165. .. note::
  166. Soft time limits will still not work on Windows or other platforms
  167. that do not have the ``SIGUSR1`` signal.
  168. * Redis backend configuration directive names changed to include the
  169. ``CELERY_`` prefix.
  170. ===================================== ===================================
  171. **Old setting name** **Replace with**
  172. ===================================== ===================================
  173. `REDIS_HOST` `CELERY_REDIS_HOST`
  174. `REDIS_PORT` `CELERY_REDIS_PORT`
  175. `REDIS_DB` `CELERY_REDIS_DB`
  176. `REDIS_PASSWORD` `CELERY_REDIS_PASSWORD`
  177. ===================================== ===================================
  178. The old names are still supported but pending deprecation.
  179. * PyPy: The default pool implementation used is now multiprocessing
  180. if running on PyPy 1.5.
  181. * multi: now supports "pass through" options.
  182. Pass through options makes it easier to use celery without a
  183. configuration file, or just add last-minute options on the command
  184. line.
  185. Example use:
  186. .. code-block:: bash
  187. $ celery multi start 4 -c 2 -- broker.host=amqp.example.com \
  188. broker.vhost=/ \
  189. celery.disable_rate_limits=yes
  190. * celerybeat: Now retries establishing the connection (Issue #419).
  191. * celeryctl: New ``list bindings`` command.
  192. Lists the current or all available bindings, depending on the
  193. broker transport used.
  194. * Heartbeat is now sent every 30 seconds (previously every 2 minutes).
  195. * ``ResultSet.join_native()`` and ``iter_native()`` is now supported by
  196. the Redis and Cache result backends.
  197. This is an optimized version of ``join()`` using the underlying
  198. backends ability to fetch multiple results at once.
  199. * Can now use SSL when sending error e-mails by enabling the
  200. :setting:`EMAIL_USE_SSL` setting.
  201. * ``events.default_dispatcher()``: Context manager to easily obtain
  202. an event dispatcher instance using the connection pool.
  203. * Import errors in the configuration module will not be silenced anymore.
  204. * ResultSet.iterate: Now supports the ``timeout``, ``propagate`` and
  205. ``interval`` arguments.
  206. * ``with_default_connection`` -> ``with default_connection``
  207. * TaskPool.apply_async: Keyword arguments ``callbacks`` and ``errbacks``
  208. has been renamed to ``callback`` and ``errback`` and take a single scalar
  209. value instead of a list.
  210. * No longer propagates errors occurring during process cleanup (Issue #365)
  211. * Added ``TaskSetResult.delete()``, which will delete a previously
  212. saved taskset result.
  213. * Celerybeat now syncs every 3 minutes instead of only at
  214. shutdown (Issue #382).
  215. * Monitors now properly handles unknown events, so user-defined events
  216. are displayed.
  217. * Terminating a task on Windows now also terminates all of the tasks child
  218. processes (Issue #384).
  219. * worker: ``-I|--include`` option now always searches the current directory
  220. to import the specified modules.
  221. * Cassandra backend: Now expires results by using TTLs.
  222. * Functional test suite in ``funtests`` is now actually working properly, and
  223. passing tests.
  224. .. _v230-fixes:
  225. Fixes
  226. -----
  227. * celeryev was trying to create the pidfile twice.
  228. * celery.contrib.batches: Fixed problem where tasks failed
  229. silently (Issue #393).
  230. * Fixed an issue where logging objects would give "<Unrepresentable",
  231. even though the objects were.
  232. * ``CELERY_TASK_ERROR_WHITE_LIST`` is now properly initialized
  233. in all loaders.
  234. * celeryd_detach now passes through command-line configuration.
  235. * Remote control command ``add_consumer`` now does nothing if the
  236. queue is already being consumed from.