Changelog 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293
  1. .. _changelog:
  2. ================
  3. Change history
  4. ================
  5. This document contains change notes for bugfix releases in the 3.1.x series
  6. (Cipater), please see :ref:`whatsnew-3.1` for an overview of what's
  7. new in Celery 3.1.
  8. .. _version-3.1.18:
  9. 3.1.18
  10. ======
  11. :release-date: TBD
  12. :release-by: Ask Solem
  13. - **Requirements**
  14. - Now depends on :ref:`Kombu 3.0.25 <kombu:version-3.0.25>`.
  15. - Now depends on :mod:`billiard` 3.3.0.20.
  16. - **Worker**: Properly recycle Django database connection in the worker when CONN_MAX_AGE is used.
  17. Fix contributed by Luke Burden.
  18. .. _version-3.1.17:
  19. 3.1.17
  20. ======
  21. :release-date: 2014-11-19 03:30 P.M UTC
  22. :release-by: Ask Solem
  23. .. admonition:: Do not enable the :setting:`CELERYD_FORCE_EXECV` setting!
  24. Please review your configuration and disable this option if you're using the
  25. RabbitMQ or Redis transport.
  26. Keeping this option enabled after 3.1 means the async based prefork pool will
  27. be disabled, which can easily cause instability.
  28. - **Requirements**
  29. - Now depends on :ref:`Kombu 3.0.24 <kombu:version-3.0.24>`.
  30. Includes the new Qpid transport coming in Celery 3.2, backported to
  31. support those who may still require Python 2.6 compatibility.
  32. - Now depends on :mod:`billiard` 3.3.0.19.
  33. - ``celery[librabbitmq]`` now depends on librabbitmq 1.6.1.
  34. - **Task**: The timing of ETA/countdown tasks were off after the example ``LocalTimezone``
  35. implementation in the Python documentation no longer works in Python 3.4.
  36. (Issue #2306).
  37. - **Task**: Raising :exc:`~celery.exceptions.Ignore` no longer sends
  38. ``task-failed`` event (Issue #2365).
  39. - **Redis result backend**: Fixed unbound local errors.
  40. Fix contributed by Thomas French.
  41. - **Task**: Callbacks was not called properly if ``link`` was a list of
  42. signatures (Issuse #2350).
  43. - **Canvas**: chain and group now handles json serialized signatures
  44. (Issue #2076).
  45. - **Results**: ``.join_native()`` would accidentally treat the ``STARTED``
  46. state as being ready (Issue #2326).
  47. This could lead to the chord callback being called with invalid arguments
  48. when using chords with the :setting:`CELERY_TRACK_STARTED` setting
  49. enabled.
  50. - **Canvas**: The ``chord_size`` attribute is now set for all canvas primitives,
  51. making sure more combinations will work with the ``new_join`` optimization
  52. for Redis (Issue #2339).
  53. - **Task**: Fixed problem with app not being properly propagated to
  54. ``trace_task`` in all cases.
  55. Fix contributed by kristaps.
  56. - **Worker**: Expires from task message now associated with a timezone.
  57. Fix contributed by Albert Wang.
  58. - **Cassandra result backend**: Fixed problems when using detailed mode.
  59. When using the Cassandra backend in detailed mode, a regression
  60. caused errors when attempting to retrieve results.
  61. Fix contributed by Gino Ledesma.
  62. - **Mongodb Result backend**: Pickling the backend instance will now include
  63. the original url (Issue #2347).
  64. Fix contributed by Sukrit Khera.
  65. - **Task**: Exception info was not properly set for tasks raising
  66. :exc:`~celery.exceptions.Reject` (Issue #2043).
  67. - **Worker**: Duplicates are now removed when loading the set of revoked tasks
  68. from the worker state database (Issue #2336).
  69. - **celery.contrib.rdb**: Fixed problems with ``rdb.set_trace`` calling stop
  70. from the wrong frame.
  71. Fix contributed by llllllllll.
  72. - **Canvas**: ``chain`` and ``chord`` can now be immutable.
  73. - **Canvas**: ``chord.apply_async`` will now keep partial args set in
  74. ``self.args`` (Issue #2299).
  75. - **Results**: Small refactoring so that results are decoded the same way in
  76. all result backends.
  77. - **Logging**: The ``processName`` format was introduced in Py2.6.2 so for
  78. compatibility this format is now excluded when using earlier versions
  79. (Issue #1644).
  80. .. _version-3.1.16:
  81. 3.1.16
  82. ======
  83. :release-date: 2014-10-03 06:00 P.M UTC
  84. :release-by: Ask Solem
  85. - **Worker**: 3.1.15 broke ``-Ofair`` behavior (Issue #2286).
  86. This regression could result in all tasks executing
  87. in a single child process if ``-Ofair`` was enabled.
  88. - **Canvas**: ``celery.signature`` now properly forwards app argument
  89. in all cases.
  90. - **Task**: ``.retry()`` did not raise the exception correctly
  91. when called without a current exception.
  92. Fix contributed by Andrea Rabbaglietti.
  93. - **Worker**: The ``enable_events`` remote control command
  94. disabled worker-related events by mistake (Issue #2272).
  95. Fix contributed by Konstantinos Koukopoulos.
  96. - **Django**: Adds support for Django 1.7 class names in INSTALLED_APPS
  97. when using ``app.autodiscover_tasks()`` (Issue #2248).
  98. - **Sphinx**: ``celery.contrib.sphinx`` now uses ``getfullargspec``
  99. on Python 3 (Issue #2302).
  100. - **Redis/Cache Backends**: Chords will now run at most once if one or more tasks
  101. in the chord are executed multiple times for some reason.
  102. .. _version-3.1.15:
  103. 3.1.15
  104. ======
  105. :release-date: 2014-09-14 11:00 P.M UTC
  106. :release-by: Ask Solem
  107. - **Django**: Now makes sure ``django.setup()`` is called
  108. before importing any task modules (Django 1.7 compatibility, Issue #2227)
  109. - **Results**: ``result.get()`` was misbehaving by calling
  110. ``backend.get_task_meta`` in a finally call leading to
  111. AMQP result backend queues not being properly cleaned up (Issue #2245).
  112. .. _version-3.1.14:
  113. 3.1.14
  114. ======
  115. :release-date: 2014-09-08 03:00 P.M UTC
  116. :release-by: Ask Solem
  117. - **Requirements**
  118. - Now depends on :ref:`Kombu 3.0.22 <kombu:version-3.0.22>`.
  119. - **Init scripts**: The generic worker init scripts ``status`` command
  120. now gets an accurate pidfile list (Issue #1942).
  121. - **Init scripts**: The generic beat script now implements the ``status``
  122. command.
  123. Contributed by John Whitlock.
  124. - **Commands**: Multi now writes informational output to stdout instead of stderr.
  125. - **Worker**: Now ignores not implemented error for ``pool.restart``
  126. (Issue #2153).
  127. - **Task**: Retry no longer raises retry exception when executed in eager
  128. mode (Issue #2164).
  129. - **AMQP Result backend**: Now ensured ``on_interval`` is called at least
  130. every second for blocking calls to properly propagate parent errors.
  131. - **Django**: Compatibility with Django 1.7 on Windows (Issue #2126).
  132. - **Programs**: `--umask` argument can be now specified in both octal (if starting
  133. with 0) or decimal.
  134. .. _version-3.1.13:
  135. 3.1.13
  136. ======
  137. Security Fixes
  138. --------------
  139. * [Security: `CELERYSA-0002`_] Insecure default umask.
  140. The built-in utility used to daemonize the Celery worker service sets
  141. an insecure umask by default (umask 0).
  142. This means that any files or directories created by the worker will
  143. end up having world-writable permissions.
  144. Special thanks to Red Hat for originally discovering and reporting the
  145. issue!
  146. This version will no longer set a default umask by default, so if unset
  147. the umask of the parent process will be used.
  148. .. _`CELERYSA-0002`:
  149. http://github.com/celery/celery/tree/master/docs/sec/CELERYSA-0002.txt
  150. News
  151. ----
  152. - **Requirements**
  153. - Now depends on :ref:`Kombu 3.0.21 <kombu:version-3.0.21>`.
  154. - Now depends on :mod:`billiard` 3.3.0.18.
  155. - **App**: ``backend`` argument now also sets the :setting:`CELERY_RESULT_BACKEND`
  156. setting.
  157. - **Task**: ``signature_from_request`` now propagates ``reply_to`` so that
  158. the RPC backend works with retried tasks (Issue #2113).
  159. - **Task**: ``retry`` will no longer attempt to requeue the task if sending
  160. the retry message fails.
  161. Unrelated exceptions being raised could cause a message loop, so it was
  162. better to remove this behavior.
  163. - **Beat**: Accounts for standard 1ms drift by always waking up 0.010s
  164. earlier.
  165. This will adjust the latency so that the periodic tasks will not move
  166. 1ms after every invocation.
  167. - Documentation fixes
  168. Contributed by Yuval Greenfield, Lucas Wiman, nicholsonjf
  169. - **Worker**: Removed an outdated assert statement that could lead to errors
  170. being masked (Issue #2086).
  171. .. _version-3.1.12:
  172. 3.1.12
  173. ======
  174. :release-date: 2014-06-09 10:12 P.M UTC
  175. :release-by: Ask Solem
  176. - **Requirements**
  177. Now depends on :ref:`Kombu 3.0.19 <kombu:version-3.0.19>`.
  178. - **App**: Connections were not being closed after fork due to an error in the
  179. after fork handler (Issue #2055).
  180. This could manifest itself by causing framing errors when using RabbitMQ.
  181. (``Unexpected frame``).
  182. - **Django**: ``django.setup()`` was being called too late when
  183. using Django 1.7 (Issue #1802).
  184. - **Django**: Fixed problems with event timezones when using Django
  185. (``Substantial drift``).
  186. Celery did not take into account that Django modifies the
  187. ``time.timeone`` attributes and friends.
  188. - **Canvas**: ``Signature.link`` now works when the link option is a scalar
  189. value (Issue #2019).
  190. - **Prefork pool**: Fixed race conditions for when file descriptors are
  191. removed from the event loop.
  192. Fix contributed by Roger Hu.
  193. - **Prefork pool**: Improved solution for dividing tasks between child
  194. processes.
  195. This change should improve performance when there are many child
  196. processes, and also decrease the chance that two subsequent tasks are
  197. written to the same child process.
  198. - **Worker**: Now ignores unknown event types, instead of crashing.
  199. Fix contributed by Illes Solt.
  200. - **Programs**: :program:`celery worker --detach` no longer closes open file
  201. descriptors when :envvar:`C_FAKEFORK` is used so that the workers output
  202. can be seen.
  203. - **Programs**: The default working directory for :program:`celery worker
  204. --detach` is now the current working directory, not ``/``.
  205. - **Canvas**: ``signature(s, app=app)`` did not upgrade serialized signatures
  206. to their original class (``subtask_type``) when the ``app`` keyword argument
  207. was used.
  208. - **Control**: The ``duplicate nodename`` warning emitted by control commands
  209. now shows the duplicate node name.
  210. - **Tasks**: Can now call ``ResultSet.get()`` on a result set without members.
  211. Fix contributed by Alexey Kotlyarov.
  212. - **App**: Fixed strange traceback mangling issue for
  213. ``app.connection_or_acquire``.
  214. - **Programs**: The :program:`celery multi stopwait` command is now documented
  215. in usage.
  216. - **Other**: Fixed cleanup problem with ``PromiseProxy`` when an error is
  217. raised while trying to evaluate the promise.
  218. - **Other**: The utility used to censor configuration values now handles
  219. non-string keys.
  220. Fix contributed by Luke Pomfrey.
  221. - **Other**: The ``inspect conf`` command did not handle non-string keys well.
  222. Fix contributed by Jay Farrimond.
  223. - **Programs**: Fixed argument handling problem in
  224. :program:`celery worker --detach`.
  225. Fix contributed by Dmitry Malinovsky.
  226. - **Programs**: :program:`celery worker --detach` did not forward working
  227. directory option (Issue #2003).
  228. - **Programs**: :program:`celery inspect registered` no longer includes
  229. the list of built-in tasks.
  230. - **Worker**: The ``requires`` attribute for boot steps were not being handled
  231. correctly (Issue #2002).
  232. - **Eventlet**: The eventlet pool now supports the ``pool_grow`` and
  233. ``pool_shrink`` remote control commands.
  234. Contributed by Mher Movsisyan.
  235. - **Eventlet**: The eventlet pool now implements statistics for
  236. :program:``celery inspect stats``.
  237. Contributed by Mher Movsisyan.
  238. - **Documentation**: Clarified ``Task.rate_limit`` behavior.
  239. Contributed by Jonas Haag.
  240. - **Documentation**: ``AbortableTask`` examples now updated to use the new
  241. API (Issue #1993).
  242. - **Documentation**: The security documentation examples used an out of date
  243. import.
  244. Fix contributed by Ian Dees.
  245. - **Init scripts**: The CentOS init scripts did not quote
  246. :envvar:`CELERY_CHDIR`.
  247. Fix contributed by ffeast.
  248. .. _version-3.1.11:
  249. 3.1.11
  250. ======
  251. :release-date: 2014-04-16 11:00 P.M UTC
  252. :release-by: Ask Solem
  253. - **Now compatible with RabbitMQ 3.3.0**
  254. You need to run Celery 3.1.11 or later when using RabbitMQ 3.3,
  255. and if you use the ``librabbitmq`` module you also have to upgrade
  256. to librabbitmq 1.5.0:
  257. .. code-block:: bash
  258. $ pip install -U librabbitmq
  259. - **Requirements**:
  260. - Now depends on :ref:`Kombu 3.0.15 <kombu:version-3.0.15>`.
  261. - Now depends on `billiard 3.3.0.17`_.
  262. - Bundle ``celery[librabbitmq]`` now depends on :mod:`librabbitmq` 1.5.0.
  263. .. _`billiard 3.3.0.17`:
  264. https://github.com/celery/billiard/blob/master/CHANGES.txt
  265. - **Tasks**: The :setting:`CELERY_DEFAULT_DELIVERY_MODE` setting was being
  266. ignored (Issue #1953).
  267. - **Worker**: New :option:`--heartbeat-interval` can be used to change the
  268. time (in seconds) between sending event heartbeats.
  269. Contributed by Matthew Duggan and Craig Northway.
  270. - **App**: Fixed memory leaks occurring when creating lots of temporary
  271. app instances (Issue #1949).
  272. - **MongoDB**: SSL configuration with non-MongoDB transport breaks MongoDB
  273. results backend (Issue #1973).
  274. Fix contributed by Brian Bouterse.
  275. - **Logging**: The color formatter accidentally modified ``record.msg``
  276. (Issue #1939).
  277. - **Results**: Fixed problem with task trails being stored multiple times,
  278. causing ``result.collect()`` to hang (Issue #1936, Issue #1943).
  279. - **Results**: ``ResultSet`` now implements a ``.backend`` attribute for
  280. compatibility with ``AsyncResult``.
  281. - **Results**: ``.forget()`` now also clears the local cache.
  282. - **Results**: Fixed problem with multiple calls to ``result._set_cache``
  283. (Issue #1940).
  284. - **Results**: ``join_native`` populated result cache even if disabled.
  285. - **Results**: The YAML result serializer should now be able to handle storing
  286. exceptions.
  287. - **Worker**: No longer sends task error emails for expected errors (in
  288. ``@task(throws=(..., )))``.
  289. - **Canvas**: Fixed problem with exception deserialization when using
  290. the JSON serializer (Issue #1987).
  291. - **Eventlet**: Fixes crash when ``celery.contrib.batches`` attempted to
  292. cancel a non-existing timer (Issue #1984).
  293. - Can now import ``celery.version_info_t``, and ``celery.five`` (Issue #1968).
  294. .. _version-3.1.10:
  295. 3.1.10
  296. ======
  297. :release-date: 2014-03-22 09:40 P.M UTC
  298. :release-by: Ask Solem
  299. - **Requirements**:
  300. - Now depends on :ref:`Kombu 3.0.14 <kombu:version-3.0.14>`.
  301. - **Results**:
  302. Reliability improvements to the SQLAlchemy database backend. Previously the
  303. connection from the MainProcess was improperly shared with the workers.
  304. (Issue #1786)
  305. - **Redis:** Important note about events (Issue #1882).
  306. There is a new transport option for Redis that enables monitors
  307. to filter out unwanted events. Enabling this option in the workers
  308. will increase performance considerably:
  309. .. code-block:: python
  310. BROKER_TRANSPORT_OPTIONS = {'fanout_patterns': True}
  311. Enabling this option means that your workers will not be able to see
  312. workers with the option disabled (or is running an older version of
  313. Celery), so if you do enable it then make sure you do so on all
  314. nodes.
  315. See :ref:`redis-caveats`.
  316. This will be the default in Celery 3.2.
  317. - **Results**: The :class:`@AsyncResult` object now keeps a local cache
  318. of the final state of the task.
  319. This means that the global result cache can finally be disabled,
  320. and you can do so by setting :setting:`CELERY_MAX_CACHED_RESULTS` to
  321. :const:`-1`. The lifetime of the cache will then be bound to the
  322. lifetime of the result object, which will be the default behavior
  323. in Celery 3.2.
  324. - **Events**: The "Substantial drift" warning message is now logged once
  325. per node name only (Issue #1802).
  326. - **Worker**: Ability to use one log file per child process when using the
  327. prefork pool.
  328. This can be enabled by using the new ``%i`` and ``%I`` format specifiers
  329. for the log file name. See :ref:`worker-files-process-index`.
  330. - **Redis**: New experimental chord join implementation.
  331. This is an optimization for chords when using the Redis result backend,
  332. where the join operation is now considerably faster and using less
  333. resources than the previous strategy.
  334. The new option can be set in the result backend URL:
  335. CELERY_RESULT_BACKEND = 'redis://localhost?new_join=1'
  336. This must be enabled manually as it's incompatible
  337. with workers and clients not using it, so be sure to enable
  338. the option in all clients and workers if you decide to use it.
  339. - **Multi**: With ``-opt:index`` (e.g. :option:`-c:1`) the index now always refers
  340. to the position of a node in the argument list.
  341. This means that referring to a number will work when specifying a list
  342. of node names and not just for a number range:
  343. .. code-block:: bash
  344. celery multi start A B C D -c:1 4 -c:2-4 8
  345. In this example ``1`` refers to node A (as it's the first node in the
  346. list).
  347. - **Signals**: The sender argument to ``Signal.connect`` can now be a proxy
  348. object, which means that it can be used with the task decorator
  349. (Issue #1873).
  350. - **Task**: A regression caused the ``queue`` argument to ``Task.retry`` to be
  351. ignored (Issue #1892).
  352. - **App**: Fixed error message for :meth:`~@Celery.config_from_envvar`.
  353. Fix contributed by Dmitry Malinovsky.
  354. - **Canvas**: Chords can now contain a group of other chords (Issue #1921).
  355. - **Canvas**: Chords can now be combined when using the amqp result backend
  356. (a chord where the callback is also a chord).
  357. - **Canvas**: Calling ``result.get()`` for a chain task will now complete
  358. even if one of the tasks in the chain is ``ignore_result=True``
  359. (Issue #1905).
  360. - **Canvas**: Worker now also logs chord errors.
  361. - **Canvas**: A chord task raising an exception will now result in
  362. any errbacks (``link_error``) to the chord callback to also be called.
  363. - **Results**: Reliability improvements to the SQLAlchemy database backend
  364. (Issue #1786).
  365. Previously the connection from the ``MainProcess`` was improperly
  366. inherited by child processes.
  367. Fix contributed by Ionel Cristian Mărieș.
  368. - **Task**: Task callbacks and errbacks are now called using the group
  369. primitive.
  370. - **Task**: ``Task.apply`` now properly sets ``request.headers``
  371. (Issue #1874).
  372. - **Worker**: Fixed ``UnicodeEncodeError`` occuring when worker is started
  373. by `supervisord`.
  374. Fix contributed by Codeb Fan.
  375. - **Beat**: No longer attempts to upgrade a newly created database file
  376. (Issue #1923).
  377. - **Beat**: New setting :setting:``CELERYBEAT_SYNC_EVERY`` can be be used
  378. to control file sync by specifying the number of tasks to send between
  379. each sync.
  380. Contributed by Chris Clark.
  381. - **Commands**: :program:`celery inspect memdump` no longer crashes
  382. if the :mod:`psutil` module is not installed (Issue #1914).
  383. - **Worker**: Remote control commands now always accepts json serialized
  384. messages (Issue #1870).
  385. - **Worker**: Gossip will now drop any task related events it receives
  386. by mistake (Issue #1882).
  387. .. _version-3.1.9:
  388. 3.1.9
  389. =====
  390. :release-date: 2014-02-10 06:43 P.M UTC
  391. :release-by: Ask Solem
  392. - **Requirements**:
  393. - Now depends on :ref:`Kombu 3.0.12 <kombu:version-3.0.12>`.
  394. - **Prefork pool**: Better handling of exiting child processes.
  395. Fix contributed by Ionel Cristian Mărieș.
  396. - **Prefork pool**: Now makes sure all file descriptors are removed
  397. from the hub when a process is cleaned up.
  398. Fix contributed by Ionel Cristian Mărieș.
  399. - **New Sphinx extension**: for autodoc documentation of tasks:
  400. :mod:`celery.contrib.spinx` (Issue #1833).
  401. - **Django**: Now works with Django 1.7a1.
  402. - **Task**: Task.backend is now a property that forwards to ``app.backend``
  403. if no custom backend has been specified for the task (Issue #1821).
  404. - **Generic init scripts**: Fixed bug in stop command.
  405. Fix contributed by Rinat Shigapov.
  406. - **Generic init scripts**: Fixed compatibility with GNU :manpage:`stat`.
  407. Fix contributed by Paul Kilgo.
  408. - **Generic init scripts**: Fixed compatibility with the minimal
  409. :program:`dash` shell (Issue #1815).
  410. - **Commands**: The :program:`celery amqp basic.publish` command was not
  411. working properly.
  412. Fix contributed by Andrey Voronov.
  413. - **Commands**: Did no longer emit an error message if the pidfile exists
  414. and the process is still alive (Issue #1855).
  415. - **Commands**: Better error message for missing arguments to preload
  416. options (Issue #1860).
  417. - **Commands**: :program:`celery -h` did not work because of a bug in the
  418. argument parser (Issue #1849).
  419. - **Worker**: Improved error message for message decoding errors.
  420. - **Time**: Now properly parses the `Z` timezone specifier in ISO 8601 date
  421. strings.
  422. Fix contributed by Martin Davidsson.
  423. - **Worker**: Now uses the *negotiated* heartbeat value to calculate
  424. how often to run the heartbeat checks.
  425. - **Beat**: Fixed problem with beat hanging after the first schedule
  426. iteration (Issue #1822).
  427. Fix contributed by Roger Hu.
  428. - **Signals**: The header argument to :signal:`before_task_publish` is now
  429. always a dictionary instance so that signal handlers can add headers.
  430. - **Worker**: A list of message headers is now included in message related
  431. errors.
  432. .. _version-3.1.8:
  433. 3.1.8
  434. =====
  435. :release-date: 2014-01-17 10:45 P.M UTC
  436. :release-by: Ask Solem
  437. - **Requirements**:
  438. - Now depends on :ref:`Kombu 3.0.10 <kombu:version-3.0.10>`.
  439. - Now depends on `billiard 3.3.0.14`_.
  440. .. _`billiard 3.3.0.14`:
  441. https://github.com/celery/billiard/blob/master/CHANGES.txt
  442. - **Worker**: The event loop was not properly reinitialized at consumer restart
  443. which would force the worker to continue with a closed ``epoll`` instance on
  444. Linux, resulting in a crash.
  445. - **Events:** Fixed issue with both heartbeats and task events that could
  446. result in the data not being kept in sorted order.
  447. As a result this would force the worker to log "heartbeat missed"
  448. events even though the remote node was sending heartbeats in a timely manner.
  449. - **Results:** The pickle serializer no longer converts group results to tuples,
  450. and will keep the original type (*Issue #1750*).
  451. - **Results:** ``ResultSet.iterate`` is now pending deprecation.
  452. The method will be deprecated in version 3.2 and removed in version 3.3.
  453. Use ``result.get(callback=)`` (or ``result.iter_native()`` where available)
  454. instead.
  455. - **Worker**\|eventlet/gevent: A regression caused ``Ctrl+C`` to be ineffective
  456. for shutdown.
  457. - **Redis result backend:** Now using a pipeline to store state changes
  458. for improved performance.
  459. Contributed by Pepijn de Vos.
  460. - **Redis result backend:** Will now retry storing the result if disconnected.
  461. - **Worker**\|gossip: Fixed attribute error occurring when another node leaves.
  462. Fix contributed by Brodie Rao.
  463. - **Generic init scripts:** Now runs a check at startup to verify
  464. that any configuration scripts are owned by root and that they
  465. are not world/group writeable.
  466. The init script configuration is a shell script executed by root,
  467. so this is a preventive measure to ensure that users do not
  468. leave this file vulnerable to changes by unprivileged users.
  469. .. note::
  470. Note that upgrading celery will not update the init scripts,
  471. instead you need to manually copy the improved versions from the
  472. source distribution:
  473. https://github.com/celery/celery/tree/3.1/extra/generic-init.d
  474. - **Commands**: The :program:`celery purge` command now warns that the operation
  475. will delete all tasks and prompts the user for confirmation.
  476. A new :option:`-f` was added that can be used to disable
  477. interactive mode.
  478. - **Task**: ``.retry()`` did not raise the value provided in the ``exc`` argument
  479. when called outside of an error context (*Issue #1755*).
  480. - **Commands:** The :program:`celery multi` command did not forward command
  481. line configuration to the target workers.
  482. The change means that multi will forward the special ``--`` argument and
  483. configuration content at the end of the arguments line to the specified
  484. workers.
  485. Example using command-line configuration to set a broker heartbeat
  486. from :program:`celery multi`:
  487. .. code-block:: bash
  488. $ celery multi start 1 -c3 -- broker.heartbeat=30
  489. Fix contributed by Antoine Legrand.
  490. - **Canvas:** ``chain.apply_async()`` now properly forwards execution options.
  491. Fix contributed by Konstantin Podshumok.
  492. - **Redis result backend:** Now takes ``connection_pool`` argument that can be
  493. used to change the connection pool class/constructor.
  494. - **Worker:** Now truncates very long arguments and keyword arguments logged by
  495. the pool at debug severity.
  496. - **Worker:** The worker now closes all open files on :sig:`SIGHUP` (regression)
  497. (*Issue #1768*).
  498. Fix contributed by Brodie Rao
  499. - **Worker:** Will no longer accept remote control commands while the
  500. worker startup phase is incomplete (*Issue #1741*).
  501. - **Commands:** The output of the event dump utility
  502. (:program:`celery events -d`) can now be piped into other commands.
  503. - **Documentation:** The RabbitMQ installation instructions for OS X was
  504. updated to use modern homebrew practices.
  505. Contributed by Jon Chen.
  506. - **Commands:** The :program:`celery inspect conf` utility now works.
  507. - **Commands:** The :option:`-no-color` argument was not respected by
  508. all commands (*Issue #1799*).
  509. - **App:** Fixed rare bug with ``autodiscover_tasks()`` (*Issue #1797*).
  510. - **Distribution:** The sphinx docs will now always add the parent directory
  511. to path so that the current celery source code is used as a basis for
  512. API documentation (*Issue #1782*).
  513. - **Documentation:** Supervisord examples contained an extraneous '-' in a
  514. `--logfile` argument example.
  515. Fix contributed by Mohammad Almeer.
  516. .. _version-3.1.7:
  517. 3.1.7
  518. =====
  519. :release-date: 2013-12-17 06:00 P.M UTC
  520. :release-by: Ask Solem
  521. .. _v317-important:
  522. Important Notes
  523. ---------------
  524. Init script security improvements
  525. ---------------------------------
  526. Where the generic init scripts (for ``celeryd``, and ``celerybeat``) before
  527. delegated the responsibility of dropping privileges to the target application,
  528. it will now use ``su`` instead, so that the Python program is not trusted
  529. with superuser privileges.
  530. This is not in reaction to any known exploit, but it will
  531. limit the possibility of a privilege escalation bug being abused in the
  532. future.
  533. You have to upgrade the init scripts manually from this directory:
  534. https://github.com/celery/celery/tree/3.1/extra/generic-init.d
  535. AMQP result backend
  536. ~~~~~~~~~~~~~~~~~~~
  537. The 3.1 release accidentally left the amqp backend configured to be
  538. non-persistent by default.
  539. Upgrading from 3.0 would give a "not equivalent" error when attempting to
  540. set or retrieve results for a task. That is unless you manually set the
  541. persistence setting::
  542. CELERY_RESULT_PERSISTENT = True
  543. This version restores the previous value so if you already forced
  544. the upgrade by removing the existing exchange you must either
  545. keep the configuration by setting ``CELERY_RESULT_PERSISTENT = False``
  546. or delete the ``celeryresults`` exchange again.
  547. Synchronous subtasks
  548. ~~~~~~~~~~~~~~~~~~~~
  549. Tasks waiting for the result of a subtask will now emit
  550. a :exc:`RuntimeWarning` warning when using the prefork pool,
  551. and in 3.2 this will result in an exception being raised.
  552. It's not legal for tasks to block by waiting for subtasks
  553. as this is likely to lead to resource starvation and eventually
  554. deadlock when using the prefork pool (see also :ref:`task-synchronous-subtasks`).
  555. If you really know what you are doing you can avoid the warning (and
  556. the future exception being raised) by moving the operation in a whitelist
  557. block:
  558. .. code-block:: python
  559. from celery.result import allow_join_result
  560. @app.task
  561. def misbehaving():
  562. result = other_task.delay()
  563. with allow_join_result():
  564. result.get()
  565. Note also that if you wait for the result of a subtask in any form
  566. when using the prefork pool you must also disable the pool prefetching
  567. behavior with the worker :ref:`-Ofair option <prefork-pool-prefetch>`.
  568. .. _v317-fixes:
  569. Fixes
  570. -----
  571. - Now depends on :ref:`Kombu 3.0.8 <kombu:version-3.0.8>`.
  572. - Now depends on :mod:`billiard` 3.3.0.13
  573. - Events: Fixed compatibility with non-standard json libraries
  574. that sends float as :class:`decimal.Decimal` (Issue #1731)
  575. - Events: State worker objects now always defines attributes:
  576. ``active``, ``processed``, ``loadavg``, ``sw_ident``, ``sw_ver``
  577. and ``sw_sys``.
  578. - Worker: Now keeps count of the total number of tasks processed,
  579. not just by type (``all_active_count``).
  580. - Init scripts: Fixed problem with reading configuration file
  581. when the init script is symlinked to a runlevel (e.g. ``S02celeryd``).
  582. (Issue #1740).
  583. This also removed a rarely used feature where you can symlink the script
  584. to provide alternative configurations. You instead copy the script
  585. and give it a new name, but perhaps a better solution is to provide
  586. arguments to ``CELERYD_OPTS`` to separate them:
  587. .. code-block:: bash
  588. CELERYD_NODES="X1 X2 Y1 Y2"
  589. CELERYD_OPTS="-A:X1 x -A:X2 x -A:Y1 y -A:Y2 y"
  590. - Fallback chord unlock task is now always called after the chord header
  591. (Issue #1700).
  592. This means that the unlock task will not be started if there's
  593. an error sending the header.
  594. - Celery command: Fixed problem with arguments for some control commands.
  595. Fix contributed by Konstantin Podshumok.
  596. - Fixed bug in ``utcoffset`` where the offset when in DST would be
  597. completely wrong (Issue #1743).
  598. - Worker: Errors occurring while attempting to serialize the result of a
  599. task will now cause the task to be marked with failure and a
  600. :class:`kombu.exceptions.EncodingError` error.
  601. Fix contributed by Ionel Cristian Mărieș.
  602. - Worker with ``-B`` argument did not properly shut down the beat instance.
  603. - Worker: The ``%n`` and ``%h`` formats are now also supported by the
  604. :option:`--logfile`, :option:`--pidfile` and :option:`--statedb` arguments.
  605. Example:
  606. .. code-block:: bash
  607. $ celery -A proj worker -n foo@%h --logfile=%n.log --statedb=%n.db
  608. - Redis/Cache result backends: Will now timeout if keys evicted while trying
  609. to join a chord.
  610. - The fallbock unlock chord task now raises :exc:`Retry` so that the
  611. retry even is properly logged by the worker.
  612. - Multi: Will no longer apply Eventlet/gevent monkey patches (Issue #1717).
  613. - Redis result backend: Now supports UNIX sockets.
  614. Like the Redis broker transport the result backend now also supports
  615. using ``redis+socket:///tmp/redis.sock`` URLs.
  616. Contributed by Alcides Viamontes Esquivel.
  617. - Events: Events sent by clients was mistaken for worker related events
  618. (Issue #1714).
  619. For ``events.State`` the tasks now have a ``Task.client`` attribute
  620. that is set when a ``task-sent`` event is being received.
  621. Also, a clients logical clock is not in sync with the cluster so
  622. they live in a "time bubble". So for this reason monitors will no
  623. longer attempt to merge with the clock of an event sent by a client,
  624. instead it will fake the value by using the current clock with
  625. a skew of -1.
  626. - Prefork pool: The method used to find terminated processes was flawed
  627. in that it did not also take into account missing popen objects.
  628. - Canvas: ``group`` and ``chord`` now works with anon signatures as long
  629. as the group/chord object is associated with an app instance (Issue #1744).
  630. You can pass the app by using ``group(..., app=app)``.
  631. .. _version-3.1.6:
  632. 3.1.6
  633. =====
  634. :release-date: 2013-12-02 06:00 P.M UTC
  635. :release-by: Ask Solem
  636. - Now depends on :mod:`billiard` 3.3.0.10.
  637. - Now depends on :ref:`Kombu 3.0.7 <kombu:version-3.0.7>`.
  638. - Fixed problem where Mingle caused the worker to hang at startup
  639. (Issue #1686).
  640. - Beat: Would attempt to drop privileges twice (Issue #1708).
  641. - Windows: Fixed error with ``geteuid`` not being available (Issue #1676).
  642. - Tasks can now provide a list of expected error classes (Issue #1682).
  643. The list should only include errors that the task is expected to raise
  644. during normal operation::
  645. @task(throws=(KeyError, HttpNotFound))
  646. What happens when an exceptions is raised depends on the type of error:
  647. - Expected errors (included in ``Task.throws``)
  648. Will be logged using severity ``INFO``, and traceback is excluded.
  649. - Unexpected errors
  650. Will be logged using severity ``ERROR``, with traceback included.
  651. - Cache result backend now compatible with Python 3 (Issue #1697).
  652. - CentOS init script: Now compatible with sys-v style init symlinks.
  653. Fix contributed by Jonathan Jordan.
  654. - Events: Fixed problem when task name is not defined (Issue #1710).
  655. Fix contributed by Mher Movsisyan.
  656. - Task: Fixed unbound local errors (Issue #1684).
  657. Fix contributed by Markus Ullmann.
  658. - Canvas: Now unrolls groups with only one task (optimization) (Issue #1656).
  659. - Task: Fixed problem with eta and timezones.
  660. Fix contributed by Alexander Koval.
  661. - Django: Worker now performs model validation (Issue #1681).
  662. - Task decorator now emits less confusing errors when used with
  663. incorrect arguments (Issue #1692).
  664. - Task: New method ``Task.send_event`` can be used to send custom events
  665. to Flower and other monitors.
  666. - Fixed a compatibility issue with non-abstract task classes
  667. - Events from clients now uses new node name format (``gen<pid>@<hostname>``).
  668. - Fixed rare bug with Callable not being defined at interpreter shutdown
  669. (Issue #1678).
  670. Fix contributed by Nick Johnson.
  671. - Fixed Python 2.6 compatibility (Issue #1679).
  672. .. _version-3.1.5:
  673. 3.1.5
  674. =====
  675. :release-date: 2013-11-21 06:20 P.M UTC
  676. :release-by: Ask Solem
  677. - Now depends on :ref:`Kombu 3.0.6 <kombu:version-3.0.6>`.
  678. - Now depends on :mod:`billiard` 3.3.0.8
  679. - App: ``config_from_object`` is now lazy (Issue #1665).
  680. - App: ``autodiscover_tasks`` is now lazy.
  681. Django users should now wrap access to the settings object
  682. in a lambda::
  683. app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
  684. this ensures that the settings object is not prepared
  685. prematurely.
  686. - Fixed regression for ``--app`` argument experienced by
  687. some users (Issue #1653).
  688. - Worker: Now respects the ``--uid`` and ``--gid`` arguments
  689. even if ``--detach`` is not enabled.
  690. - Beat: Now respects the ``--uid`` and ``--gid`` arguments
  691. even if ``--detach`` is not enabled.
  692. - Python 3: Fixed unorderable error occuring with the worker ``-B``
  693. argument enabled.
  694. - ``celery.VERSION`` is now a named tuple.
  695. - ``maybe_signature(list)`` is now applied recursively (Issue #1645).
  696. - ``celery shell`` command: Fixed ``IPython.frontend`` deprecation warning.
  697. - The default app no longer includes the builtin fixups.
  698. This fixes a bug where ``celery multi`` would attempt
  699. to load the Django settings module before entering
  700. the target working directory.
  701. - The Django daemonization tutorial was changed.
  702. Users no longer have to explicitly export ``DJANGO_SETTINGS_MODULE``
  703. in :file:`/etc/default/celeryd` when the new project layout is used.
  704. - Redis result backend: expiry value can now be 0 (Issue #1661).
  705. - Censoring settings now accounts for non-string keys (Issue #1663).
  706. - App: New ``autofinalize`` option.
  707. Apps are automatically finalized when the task registry is accessed.
  708. You can now disable this behavior so that an exception is raised
  709. instead.
  710. Example:
  711. .. code-block:: python
  712. app = Celery(autofinalize=False)
  713. # raises RuntimeError
  714. tasks = app.tasks
  715. @app.task
  716. def add(x, y):
  717. return x + y
  718. # raises RuntimeError
  719. add.delay(2, 2)
  720. app.finalize()
  721. # no longer raises:
  722. tasks = app.tasks
  723. add.delay(2, 2)
  724. - The worker did not send monitoring events during shutdown.
  725. - Worker: Mingle and gossip is now automatically disabled when
  726. used with an unsupported transport (Issue #1664).
  727. - ``celery`` command: Preload options now supports
  728. the rare ``--opt value`` format (Issue #1668).
  729. - ``celery`` command: Accidentally removed options
  730. appearing before the subcommand, these are now moved to the end
  731. instead.
  732. - Worker now properly responds to ``inspect stats`` commands
  733. even if received before startup is complete (Issue #1659).
  734. - :signal:`task_postrun` is now sent within a finally block, to make
  735. sure the signal is always sent.
  736. - Beat: Fixed syntax error in string formatting.
  737. Contributed by nadad.
  738. - Fixed typos in the documentation.
  739. Fixes contributed by Loic Bistuer, sunfinite.
  740. - Nested chains now works properly when constructed using the
  741. ``chain`` type instead of the ``|`` operator (Issue #1656).
  742. .. _version-3.1.4:
  743. 3.1.4
  744. =====
  745. :release-date: 2013-11-15 11:40 P.M UTC
  746. :release-by: Ask Solem
  747. - Now depends on :ref:`Kombu 3.0.5 <kombu:version-3.0.5>`.
  748. - Now depends on :mod:`billiard` 3.3.0.7
  749. - Worker accidentally set a default socket timeout of 5 seconds.
  750. - Django: Fixup now sets the default app so that threads will use
  751. the same app instance (e.g. for manage.py runserver).
  752. - Worker: Fixed Unicode error crash at startup experienced by some users.
  753. - Calling ``.apply_async`` on an empty chain now works again (Issue #1650).
  754. - The ``celery multi show`` command now generates the same arguments
  755. as the start command does.
  756. - The ``--app`` argument could end up using a module object instead
  757. of an app instance (with a resulting crash).
  758. - Fixed a syntax error problem in the celerybeat init script.
  759. Fix contributed by Vsevolod.
  760. - Tests now passing on PyPy 2.1 and 2.2.
  761. .. _version-3.1.3:
  762. 3.1.3
  763. =====
  764. :release-date: 2013-11-13 00:55 A.M UTC
  765. :release-by: Ask Solem
  766. - Fixed compatibility problem with Python 2.7.0 - 2.7.5 (Issue #1637)
  767. ``unpack_from`` started supporting ``memoryview`` arguments
  768. in Python 2.7.6.
  769. - Worker: :option:`-B` argument accidentally closed files used
  770. for logging.
  771. - Task decorated tasks now keep their docstring (Issue #1636)
  772. .. _version-3.1.2:
  773. 3.1.2
  774. =====
  775. :release-date: 2013-11-12 08:00 P.M UTC
  776. :release-by: Ask Solem
  777. - Now depends on :mod:`billiard` 3.3.0.6
  778. - No longer needs the billiard C extension to be installed.
  779. - The worker silently ignored task errors.
  780. - Django: Fixed ``ImproperlyConfigured`` error raised
  781. when no database backend specified.
  782. Fix contributed by j0hnsmith
  783. - Prefork pool: Now using ``_multiprocessing.read`` with ``memoryview``
  784. if available.
  785. - ``close_open_fds`` now uses ``os.closerange`` if available.
  786. - ``get_fdmax`` now takes value from ``sysconfig`` if possible.
  787. .. _version-3.1.1:
  788. 3.1.1
  789. =====
  790. :release-date: 2013-11-11 06:30 P.M UTC
  791. :release-by: Ask Solem
  792. - Now depends on :mod:`billiard` 3.3.0.4.
  793. - Python 3: Fixed compatibility issues.
  794. - Windows: Accidentally showed warning that the billiard C extension
  795. was not installed (Issue #1630).
  796. - Django: Tutorial updated with a solution that sets a default
  797. :envvar:`DJANGO_SETTINGS_MODULE` so that it doesn't have to be typed
  798. in with the :program:`celery` command.
  799. Also fixed typos in the tutorial, and added the settings
  800. required to use the Django database backend.
  801. Thanks to Chris Ward, orarbel.
  802. - Django: Fixed a problem when using the Django settings in Django 1.6.
  803. - Django: Fixup should not be applied if the django loader is active.
  804. - Worker: Fixed attribute error for ``human_write_stats`` when using the
  805. compatibility prefork pool implementation.
  806. - Worker: Fixed compatibility with billiard without C extension.
  807. - Inspect.conf: Now supports a ``with_defaults`` argument.
  808. - Group.restore: The backend argument was not respected.
  809. .. _version-3.1.0:
  810. 3.1.0
  811. =======
  812. :release-date: 2013-11-09 11:00 P.M UTC
  813. :release-by: Ask Solem
  814. See :ref:`whatsnew-3.1`.