Changelog 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. .. _changelog:
  2. ================
  3. Change history
  4. ================
  5. <<<<<<< HEAD
  6. This document contains change notes for bugfix releases in the 3.1.x series
  7. (Cipater), please see :ref:`whatsnew-3.1` for an overview of what's
  8. new in Celery 3.1.
  9. =======
  10. .. contents::
  11. :local:
  12. If you're looking for versions prior to 3.0.x you should go to :ref:`history`.
  13. .. _version-3.0.13:
  14. 3.0.13
  15. ======
  16. :release-date: 2012-11-30 XX:XX:XX X.X UTC
  17. - Now depends on Kombu 2.5
  18. - py-amqp has replaced amqplib as the default transport,
  19. gaining support for AMQP 0.9, and the RabbitMQ extensions
  20. including Consumer Cancel Notifications and heartbeats.
  21. - support for multiple connection URLs for failover.
  22. - Read more in the `Kombu 2.5 changelog`_.
  23. .. _`Kombu 2.5 changelog`:
  24. http://kombu.readthedocs.org/en/latest/changelog.html#version-2-5-0
  25. - Now depends on billiard 2.7.3.19
  26. - Fixed a deadlock issue that could occur when the producer pool
  27. inherited the connection pool instance of the parent process.
  28. - The :option:`--loader` option now works again (Issue #1066).
  29. - :program:`celery` umbrella command: All subcommands now supports
  30. the :option:`--workdir` option (Issue #1063).
  31. - Groups included in chains now give GroupResults (Issue #1057)
  32. Previously it would incorrectly add a regular result instead of a group
  33. result, but now this works:
  34. .. code-block:: python
  35. # [4 + 4, 4 + 8, 16 + 8]
  36. >>> res = (add.s(2, 2) | group(add.s(4), add.s(8), add.s(16)))()
  37. >>> res
  38. <GroupResult: a0acf905-c704-499e-b03a-8d445e6398f7 [
  39. 4346501c-cb99-4ad8-8577-12256c7a22b1,
  40. b12ead10-a622-4d44-86e9-3193a778f345,
  41. 26c7a420-11f3-4b33-8fac-66cd3b62abfd]>
  42. - Chains can now chain other chains and use partial arguments (Issue #1057).
  43. Example:
  44. .. code-block:: python
  45. >>> c1 = (add.s(2) | add.s(4))
  46. >>> c2 = (add.s(8) | add.s(16))
  47. >>> c3 = (c1 | c2)
  48. # 8 + 2 + 4 + 8 + 16
  49. >>> assert c3(8).get() == 38
  50. - Subtasks can now be used with unregistered tasks.
  51. You can specify subtasks even if you just have the name::
  52. >>> s = subtask(task_name, args=(), kwargs=())
  53. >>> s.delay()
  54. - The :program:`celery shell` command now always adds the current
  55. directory to the module path.
  56. - The worker will now properly handle the :exc:`pytz.AmbiguousTimeError`
  57. exception raised when an ETA/countdown is prepared while being in DST
  58. transition (Issue #1061).
  59. - force_execv: Now makes sure that task symbols in the original
  60. task modules will always use the correct app instance (Issue #1072).
  61. - AMQP Backend: Now republishes result messages that have been polled
  62. (using ``result.ready()`` and friends, ``result.get()`` will not do this
  63. in this version).
  64. - Handling of ETA/countdown fixed when the :setting:`CELERY_ENABLE_UTC`
  65. setting is disabled (Issue #1065).
  66. - A number of uneeded properties were included in messages,
  67. caused by accidentally passing ``Queue.as_dict`` as message properties.
  68. - Fixed a typo in the broadcast routing documentation (Issue #1026).
  69. - Rewrote confusing section about idempotence in the task user guide.
  70. - Fixed typo in the daemonization tutorial (Issue #1055).
  71. - Fixed several typos in the documentation.
  72. Contributed by Marius Gedminas.
  73. - Batches: Now works when using the eventlet pool.
  74. Fix contributed by Thomas Grainger.
  75. - Batches: Added example sending results to :mod:`celery.contrib.batches`.
  76. Contributed by Thomas Grainger.
  77. - Fixed problem when using earlier versions of :mod:`pytz`.
  78. Fix contributed by Vlad.
  79. - Docs updated to include the default value for the
  80. :setting:`CELERY_TASK_RESULT_EXPIRES` setting.
  81. - Improvements to the django-celery tutorial.
  82. Contributed by Locker537.
  83. - The ``add_consumer`` control command did not properly persist
  84. the addition of new queues so that they survived connection failure
  85. (Issue #1079).
  86. 3.0.12
  87. ======
  88. :release-date: 2012-11-06 02:00 P.M UTC
  89. - Now depends on kombu 2.4.8
  90. - [Redis] New and improved fair queue cycle algorithm (Kevin McCarthy).
  91. - [Redis] Now uses a Redis-based mutex when restoring messages.
  92. - [Redis] Number of messages that can be restored in one interval is no
  93. longer limited (but can be set using the
  94. ``unacked_restore_limit``
  95. :setting:`transport option <BROKER_TRANSPORT_OPTIONS>`.)
  96. - Heartbeat value can be specified in broker URLs (Mher Movsisyan).
  97. - Fixed problem with msgpack on Python 3 (Jasper Bryant-Greene).
  98. - Now depends on billiard 2.7.3.18
  99. - Celery can now be used with static analysis tools like PyDev/PyCharm/pylint
  100. etc.
  101. - Development documentation has moved to Read The Docs.
  102. The new URL is: http://docs.celeryproject.org/en/master
  103. - New :setting:`CELERY_QUEUE_HA_POLICY` setting used to set the default
  104. HA policy for queues when using RabbitMQ.
  105. - New method ``Task.subtask_from_request`` returns a subtask using the current
  106. request.
  107. - Results get_many method did not respect timeout argument.
  108. Fix contributed by Remigiusz Modrzejewski
  109. - generic_init.d scripts now support setting :envvar:`CELERY_CREATE_DIRS` to
  110. always create log and pid directories (Issue #1045).
  111. This can be set in your :file:`/etc/default/celeryd`.
  112. - Fixed strange kombu import problem on Python 3.2 (Issue #1034).
  113. - Worker: ETA scheduler now uses millisecond precision (Issue #1040).
  114. - The ``--config`` argument to programs is now supported by all loaders.
  115. - The :setting:`CASSANDRA_OPTIONS` setting has now been documented.
  116. Contributed by Jared Biel.
  117. - Task methods (:mod:`celery.contrib.methods`) cannot be used with the old
  118. task base class, the task decorator in that module now inherits from the new.
  119. - An optimization was too eager and caused some logging messages to never emit.
  120. - :mod:`celery.contrib.batches` now works again.
  121. - Fixed missing whitespace in ``bdist_rpm`` requirements (Issue #1046).
  122. - Event state's ``tasks_by_name`` applied limit before filtering by name.
  123. Fix contributed by Alexander A. Sosnovskiy.
  124. .. _version-3.0.11:
  125. 3.0.11
  126. ======
  127. :release-date: 2012-09-26 04:00 P.M UTC
  128. - [security:low] generic-init.d scripts changed permissions of /var/log & /var/run
  129. In the daemonization tutorial the recommended directories were as follows:
  130. .. code-block:: bash
  131. CELERYD_LOG_FILE="/var/log/celery/%n.log"
  132. CELERYD_PID_FILE="/var/run/celery/%n.pid"
  133. But in the scripts themselves the default files were ``/var/log/celery%n.log``
  134. and ``/var/run/celery%n.pid``, so if the user did not change the location
  135. by configuration, the directories ``/var/log`` and ``/var/run`` would be
  136. created - and worse have their permissions and owners changed.
  137. This change means that:
  138. - Default pid file is ``/var/run/celery/%n.pid``
  139. - Default log file is ``/var/log/celery/%n.log``
  140. - The directories are only created and have their permissions
  141. changed if *no custom locations are set*.
  142. Users can force paths to be created by calling the ``create-paths``
  143. subcommand:
  144. .. code-block:: bash
  145. $ sudo /etc/init.d/celeryd create-paths
  146. .. admonition:: Upgrading Celery will not update init scripts
  147. To update the init scripts you have to re-download
  148. the files from source control and update them manually.
  149. You can find the init scripts for version 3.0.x at:
  150. http://github.com/celery/celery/tree/3.0/extra/generic-init.d
  151. - Now depends on billiard 2.7.3.17
  152. - Fixes request stack protection when app is initialized more than
  153. once (Issue #1003).
  154. - ETA tasks now properly works when system timezone is not the same
  155. as the configured timezone (Issue #1004).
  156. - Terminating a task now works if the task has been sent to the
  157. pool but not yet acknowledged by a pool process (Issue #1007).
  158. Fix contributed by Alexey Zatelepin
  159. - Terminating a task now properly updates the state of the task to revoked,
  160. and sends a ``task-revoked`` event.
  161. - Generic worker init script now waits for workers to shutdown by default.
  162. - Multi: No longer parses --app option (Issue #1008).
  163. - Multi: stop_verify command renamed to stopwait.
  164. - Daemonization: Now delays trying to create pidfile/logfile until after
  165. the working directory has been changed into.
  166. - :program:`celery worker` and :program:`celery beat` commands now respects
  167. the :option:`--no-color` option (Issue #999).
  168. - Fixed typos in eventlet examples (Issue #1000)
  169. Fix contributed by Bryan Bishop.
  170. Congratulations on opening bug #1000!
  171. - Tasks that raise :exc:`~celery.exceptions.Ignore` are now acknowledged.
  172. - Beat: Now shows the name of the entry in ``sending due task`` logs.
  173. .. _version-3.0.10:
  174. 3.0.10
  175. ======
  176. :release-date: 2012-09-20 05:30 P.M BST
  177. - Now depends on kombu 2.4.7
  178. - Now depends on billiard 2.7.3.14
  179. - Fixes crash at startup when using Django and pre-1.4 projects
  180. (setup_environ).
  181. - Hard time limits now sends the KILL signal shortly after TERM,
  182. to terminate processes that have signal handlers blocked by C extensions.
  183. - Billiard now installs even if the C extension cannot be built.
  184. It's still recommended to build the C extension if you are using
  185. a transport other than rabbitmq/redis (or use forced execv for some
  186. other reason).
  187. - Pool now sets a ``current_process().index`` attribute that can be used to create
  188. as many log files as there are processes in the pool.
  189. - Canvas: chord/group/chain no longer modifies the state when called
  190. Previously calling a chord/group/chain would modify the ids of subtasks
  191. so that:
  192. .. code-block:: python
  193. >>> c = chord([add.s(2, 2), add.s(4, 4)], xsum.s())
  194. >>> c()
  195. >>> c() <-- call again
  196. at the second time the ids for the tasks would be the same as in the
  197. previous invocation. This is now fixed, so that calling a subtask
  198. won't mutate any options.
  199. - Canvas: Chaining a chord to another task now works (Issue #965).
  200. - Worker: Fixed a bug where the request stack could be corrupted if
  201. relative imports are used.
  202. Problem usually manifested itself as an exception while trying to
  203. send a failed task result (``NoneType does not have id attribute``).
  204. Fix contributed by Sam Cooke.
  205. - Tasks can now raise :exc:`~celery.exceptions.Ignore` to skip updating states
  206. or events after return.
  207. Example:
  208. .. code-block:: python
  209. from celery.exceptions import Ignore
  210. @task
  211. def custom_revokes():
  212. if redis.sismember('tasks.revoked', custom_revokes.request.id):
  213. raise Ignore()
  214. - The worker now makes sure the request/task stacks are not modified
  215. by the initial ``Task.__call__``.
  216. This would previously be a problem if a custom task class defined
  217. ``__call__`` and also called ``super()``.
  218. - Because of problems the fast local optimization has been disabled,
  219. and can only be enabled by setting the :envvar:`USE_FAST_LOCALS` attribute.
  220. - Worker: Now sets a default socket timeout of 5 seconds at shutdown
  221. so that broken socket reads do not hinder proper shutdown (Issue #975).
  222. - More fixes related to late eventlet/gevent patching.
  223. - Documentation for settings out of sync with reality:
  224. - :setting:`CELERY_TASK_PUBLISH_RETRY`
  225. Documented as disabled by default, but it was enabled by default
  226. since 2.5 as stated by the 2.5 changelog.
  227. - :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`
  228. The default max_retries had been set to 100, but documented as being
  229. 3, and the interval_max was set to 1 but documented as 0.2.
  230. The default setting are now set to 3 and 0.2 as it was originally
  231. documented.
  232. Fix contributed by Matt Long.
  233. - Worker: Log messages when connection established and lost have been improved.
  234. - The repr of a crontab schedule value of '0' should be '*' (Issue #972).
  235. - Revoked tasks are now removed from reserved/active state in the worker
  236. (Issue #969)
  237. Fix contributed by Alexey Zatelepin.
  238. - gevent: Now supports hard time limits using ``gevent.Timeout``.
  239. - Documentation: Links to init scripts now point to the 3.0 branch instead
  240. of the development branch (master).
  241. - Documentation: Fixed typo in signals user guide (Issue #986).
  242. ``instance.app.queues`` -> ``instance.app.amqp.queues``.
  243. - Eventlet/gevent: The worker did not properly set the custom app
  244. for new greenlets.
  245. - Eventlet/gevent: Fixed a bug where the worker could not recover
  246. from connection loss (Issue #959).
  247. Also, because of a suspected bug in gevent the
  248. :setting:`BROKER_CONNECTION_TIMEOUT` setting has been disabled
  249. when using gevent
  250. 3.0.9
  251. =====
  252. :release-date: 2012-08-31 06:00 P.M BST
  253. - Important note for users of Django and the database scheduler!
  254. Recently a timezone issue has been fixed for periodic tasks,
  255. but erroneous timezones could have already been stored in the
  256. database, so for the fix to work you need to reset
  257. the ``last_run_at`` fields.
  258. You can do this by executing the following command:
  259. .. code-block:: bash
  260. $ python manage.py shell
  261. >>> from djcelery.models import PeriodicTask
  262. >>> PeriodicTask.objects.update(last_run_at=None)
  263. You also have to do this if you change the timezone or
  264. :setting:`CELERY_ENABLE_UTC` setting.
  265. - Note about the :setting:`CELERY_ENABLE_UTC` setting.
  266. If you previously disabled this just to force periodic tasks to work with
  267. your timezone, then you are now *encouraged to re-enable it*.
  268. - Now depends on Kombu 2.4.5 which fixes PyPy + Jython installation.
  269. - Fixed bug with timezones when :setting:`CELERY_ENABLE_UTC` is disabled
  270. (Issue #952).
  271. - Fixed a typo in the celerybeat upgrade mechanism (Issue #951).
  272. - Make sure the `exc_info` argument to logging is resolved (Issue #899).
  273. - Fixed problem with Python 3.2 and thread join timeout overflow (Issue #796).
  274. - A test case was occasionally broken for Python 2.5.
  275. - Unit test suite now passes for PyPy 1.9.
  276. - App instances now supports the with statement.
  277. This calls the new :meth:`~celery.Celery.close` method at exit, which
  278. cleans up after the app like closing pool connections.
  279. Note that this is only necessary when dynamically creating apps,
  280. e.g. for "temporary" apps.
  281. - Support for piping a subtask to a chain.
  282. For example:
  283. .. code-block:: python
  284. pipe = sometask.s() | othertask.s()
  285. new_pipe = mytask.s() | pipe
  286. Contributed by Steve Morin.
  287. - Fixed problem with group results on non-pickle serializers.
  288. Fix contributed by Steeve Morin.
  289. .. _version-3.0.8:
  290. 3.0.8
  291. =====
  292. :release-date: 2012-08-29 05:00 P.M BST
  293. - Now depends on Kombu 2.4.4
  294. - Fixed problem with amqplib and receiving larger message payloads
  295. (Issue #922).
  296. The problem would manifest itself as either the worker hanging,
  297. or occasionally a ``Framing error`` exception appearing.
  298. Users of the new ``pyamqp://`` transport must upgrade to
  299. :mod:`amqp` 0.9.3.
  300. - Beat: Fixed another timezone bug with interval and crontab schedules
  301. (Issue #943).
  302. - Beat: The schedule file is now automatically cleared if the timezone
  303. is changed.
  304. The schedule is also cleared when you upgrade to 3.0.8 from an earlier
  305. version, this to register the initial timezone info.
  306. - Events: The :event:`worker-heartbeat` event now include processed and active
  307. count fields.
  308. Contributed by Mher Movsisyan.
  309. - Fixed error with error email and new task classes (Issue #931).
  310. - ``BaseTask.__call__`` is no longer optimized away if it has been monkey
  311. patched.
  312. - Fixed shutdown issue when using gevent (Issue #911 & Issue #936).
  313. >>>>>>> 3.0
  314. If you're looking for versions prior to 3.1 you should visit our
  315. :ref:`history` of releases.
  316. .. contents::
  317. :local:
  318. .. _version-3.1.0:
  319. 3.1.0
  320. =====
  321. :state: FROZEN
  322. :branch: master
  323. See :ref:`whatsnew-3.1`