Changelog 15 KB

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