Changelog 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701
  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.24:
  9. 3.1.24
  10. ======
  11. :release-date: 2016-09-30 04:21 PM PDT
  12. :release-by: Ask Solem
  13. - **Requirements**
  14. - Now depends on :ref:`Kombu 3.0.36 <kombu:version-3.0.36>`.
  15. - Now supports Task protocol 2 from the future 4.0 release.
  16. Workers running 3.1.24 are now able to process messages
  17. sent using the `new task message protocol`_ to be introduced
  18. in Celery 4.0.
  19. Users upgrading to Celery 4.0 when this is released are encouraged
  20. to upgrade to this version as an intermediate step, as this
  21. means workers not yet upgraded will be able to process
  22. messages from clients/workers running 4.0.
  23. .. _`new task message protocol`:
  24. http://docs.celeryproject.org/en/master/internals/protocol.html#version-2
  25. - ``Task.send_events`` can now be set to disable sending of events
  26. for that task only.
  27. Example when defining the task:
  28. .. code-block:: python
  29. @app.task(send_events=False)
  30. def add(x, y):
  31. return x + y
  32. - **Utils**: Fixed compatibility with recent :pypi:`psutil` versions
  33. (Issue #3262).
  34. - **Canvas**: Chord now forwards partial arguments to its subtasks.
  35. Fix contributed by Tayfun Sen.
  36. - **App**: Arguments to app such as ``backend``, ``broker``, etc
  37. are now pickled and sent to the child processes on Windows.
  38. Fix contributed by Jeremy Zafran.
  39. - **Deployment**: Generic init scripts now supports being symlinked
  40. in runlevel directories (Issue #3208).
  41. - **Deployment**: Updated CentOS scripts to work with CentOS 7.
  42. Contributed by Joe Sanford.
  43. - **Events**: The curses monitor no longer crashes when the
  44. result of a task is empty.
  45. Fix contributed by Dongweiming.
  46. - **Worker**: ``repr(worker)`` would crash when called early
  47. in the startup process (Issue #2514).
  48. - **Tasks**: GroupResult now defines __bool__ and __nonzero__.
  49. This is to fix an issue where a ResultSet or GroupResult with an empty
  50. result list are not properly tupled with the as_tuple() method when it is
  51. a parent result. This is due to the as_tuple() method performing a logical
  52. and operation on the ResultSet.
  53. Fix contributed by Colin McIntosh.
  54. - **Worker**: Fixed wrong values in autoscale related logging message.
  55. Fix contributed by ``@raducc``.
  56. - Documentation improvements by
  57. * Alexandru Chirila
  58. * Michael Aquilina
  59. * Mikko Ekström
  60. * Mitchel Humpherys
  61. * Thomas A. Neil
  62. * Tiago Moreira Vieira
  63. * Yuriy Syrovetskiy
  64. * ``@dessant``
  65. .. _version-3.1.23:
  66. 3.1.23
  67. ======
  68. :release-date: 2016-03-09 06:00 P.M PST
  69. :release-by: Ask Solem
  70. - **Programs**: Last release broke support for the ``--hostnmame`` argument
  71. to :program:`celery multi` and :program:`celery worker --detach`
  72. (Issue #3103).
  73. - **Results**: MongoDB result backend could crash the worker at startup
  74. if not configured using an URL.
  75. .. _version-3.1.22:
  76. 3.1.22
  77. ======
  78. :release-date: 2016-03-07 01:30 P.M PST
  79. :release-by: Ask Solem
  80. - **Programs**: The worker would crash immediately on startup on
  81. ``backend.as_uri()`` when using some result backends (Issue #3094).
  82. - **Programs**: :program:`celery multi`/:program:`celery worker --detach`
  83. would create an extraneous logfile including literal formats (e.g. ``%I``)
  84. in the filename (Issue #3096).
  85. .. _version-3.1.21:
  86. 3.1.21
  87. ======
  88. :release-date: 2016-03-04 11:16 A.M PST
  89. :release-by: Ask Solem
  90. - **Requirements**
  91. - Now depends on :ref:`Kombu 3.0.34 <kombu:version-3.0.34>`.
  92. - Now depends on :mod:`billiard` 3.3.0.23.
  93. - **Prefork pool**: Fixes 100% CPU loop on Linux epoll (Issue #1845).
  94. Also potential fix for: Issue #2142, Issue #2606
  95. - **Prefork pool**: Fixes memory leak related to processes exiting
  96. (Issue #2927).
  97. - **Worker**: Fixes crash at startup when trying to censor passwords
  98. in MongoDB and Cache result backend URLs (Issue #3079, Issue #3045,
  99. Issue #3049, Issue #3068, Issue #3073).
  100. Fix contributed by Maxime Verger.
  101. - **Task**: An exception is now raised if countdown/expires is less
  102. than -2147483648 (Issue #3078).
  103. - **Programs**: :program:`celery shell --ipython` now compatible with newer
  104. IPython versions.
  105. - **Programs**: The DuplicateNodeName warning emitted by inspect/control
  106. now includes a list of the node names returned.
  107. Contributed by Sebastian Kalinowski.
  108. - **Utils**: The ``.discard(item)`` method of
  109. :class:`~celery.datastructures.LimitedSet` did not actually remove the item
  110. (Issue #3087).
  111. Fix contributed by Dave Smith.
  112. - **Worker**: Node name formatting now emits less confusing error message
  113. for unmatched format keys (Issue #3016).
  114. - **Results**: amqp/rpc backends: Fixed deserialization of JSON exceptions
  115. (Issue #2518).
  116. Fix contributed by Allard Hoeve.
  117. - **Prefork pool**: The `process inqueue damaged` error message now includes
  118. the original exception raised.
  119. - **Documentation**: Includes improvements by:
  120. - Jeff Widman.
  121. .. _version-3.1.20:
  122. 3.1.20
  123. ======
  124. :release-date: 2016-01-22 06:50 P.M UTC
  125. :release-by: Ask Solem
  126. - **Requirements**
  127. - Now depends on :ref:`Kombu 3.0.33 <kombu:version-3.0.33>`.
  128. - Now depends on :mod:`billiard` 3.3.0.22.
  129. Includes binary wheels for Microsoft Windows x86 and x86_64!
  130. - **Task**: Error emails now uses ``utf-8`` charset by default (Issue #2737).
  131. - **Task**: Retry now forwards original message headers (Issue #3017).
  132. - **Worker**: Bootsteps can now hook into ``on_node_join``/``leave``/``lost``.
  133. See :ref:`extending-consumer-gossip` for an example.
  134. - **Events**: Fixed handling of DST timezones (Issue #2983).
  135. - **Results**: Redis backend stopped respecting certain settings.
  136. Contributed by Jeremy Llewellyn.
  137. - **Results**: Database backend now properly supports JSON exceptions
  138. (Issue #2441).
  139. - **Results**: Redis ``new_join`` did not properly call task errbacks on chord
  140. error (Issue #2796).
  141. - **Results**: Restores Redis compatibility with redis-py < 2.10.0
  142. (Issue #2903).
  143. - **Results**: Fixed rare issue with chord error handling (Issue #2409).
  144. - **Tasks**: Using queue-name values in :setting:`CELERY_ROUTES` now works
  145. again (Issue #2987).
  146. - **General**: Result backend password now sanitized in report output
  147. (Issue #2812, Issue #2004).
  148. - **Configuration**: Now gives helpful error message when the result backend
  149. configuration points to a module, and not a class (Issue #2945).
  150. - **Results**: Exceptions sent by JSON serialized workers are now properly
  151. handled by pickle configured workers.
  152. - **Programs**: ``celery control autoscale`` now works (Issue #2950).
  153. - **Programs**: ``celery beat --detached`` now runs after fork callbacks.
  154. - **General**: Fix for LRU cache implementation on Python 3.5 (Issue #2897).
  155. Contributed by Dennis Brakhane.
  156. Python 3.5's ``OrderedDict`` does not allow mutation while it is being
  157. iterated over. This breaks "update" if it is called with a dict
  158. larger than the maximum size.
  159. This commit changes the code to a version that does not iterate over
  160. the dict, and should also be a little bit faster.
  161. - **Init scripts**: The beat init script now properly reports service as down
  162. when no pid file can be found.
  163. Eric Zarowny
  164. - **Beat**: Added cleaning of corrupted scheduler files for some storage
  165. backend errors (Issue #2985).
  166. Fix contributed by Aleksandr Kuznetsov.
  167. - **Beat**: Now syncs the schedule even if the schedule is empty.
  168. Fix contributed by Colin McIntosh.
  169. - **Supervisord**: Set higher process priority in supervisord example.
  170. Contributed by George Tantiras.
  171. - **Documentation**: Includes improvements by:
  172. - Bryson
  173. - Caleb Mingle
  174. - Christopher Martin
  175. - Dieter Adriaenssens
  176. - Jason Veatch
  177. - Jeremy Cline
  178. - Juan Rossi
  179. - Kevin Harvey
  180. - Kevin McCarthy
  181. - Kirill Pavlov
  182. - Marco Buttu
  183. - Mayflower
  184. - Mher Movsisyan
  185. - Michael Floering
  186. - michael-k
  187. - Nathaniel Varona
  188. - Rudy Attias
  189. - Ryan Luckie
  190. - Steven Parker
  191. - squfrans
  192. - Tadej Janež
  193. - TakesxiSximada
  194. - Tom S
  195. .. _version-3.1.19:
  196. 3.1.19
  197. ======
  198. :release-date: 2015-10-26 01:00 P.M UTC
  199. :release-by: Ask Solem
  200. - **Requirements**
  201. - Now depends on :ref:`Kombu 3.0.29 <kombu:version-3.0.29>`.
  202. - Now depends on :mod:`billiard` 3.3.0.21.
  203. - **Results**: Fixed MongoDB result backend URL parsing problem
  204. (Issue celery/kombu#375).
  205. - **Worker**: Task request now properly sets ``priority`` in delivery_info.
  206. Fix contributed by Gerald Manipon.
  207. - **Beat**: PyPy shelve may raise ``KeyError`` when setting keys
  208. (Issue #2862).
  209. - **Programs**: :program:`celery beat --deatched` now working on PyPy.
  210. Fix contributed by Krzysztof Bujniewicz.
  211. - **Results**: Redis result backend now ensures all pipelines are cleaned up.
  212. Contributed by Justin Patrin.
  213. - **Results**: Redis result backend now allows for timeout to be set in the
  214. query portion of the result backend URL.
  215. E.g. ``CELERY_RESULT_BACKEND = 'redis://?timeout=10'``
  216. Contributed by Justin Patrin.
  217. - **Results**: ``result.get`` now properly handles failures where the
  218. exception value is set to :const:`None` (Issue #2560).
  219. - **Prefork pool**: Fixed attribute error ``proc.dead``.
  220. - **Worker**: Fixed worker hanging when gossip/heartbeat disabled
  221. (Issue #1847).
  222. Fix contributed by Aaron Webber and Bryan Helmig.
  223. - **Results**: MongoDB result backend now supports pymongo 3.x
  224. (Issue #2744).
  225. Fix contributed by Sukrit Khera.
  226. - **Results**: RPC/amqp backends did not deserialize exceptions properly
  227. (Issue #2691).
  228. Fix contributed by Sukrit Khera.
  229. - **Programs**: Fixed problem with :program:`celery amqp`'s
  230. ``basic_publish`` (Issue #2013).
  231. - **Worker**: Embedded beat now properly sets app for thread/process
  232. (Issue #2594).
  233. - **Documentation**: Many improvements and typos fixed.
  234. Contributions by:
  235. Carlos Garcia-Dubus
  236. D. Yu
  237. jerry
  238. Jocelyn Delalande
  239. Josh Kupershmidt
  240. Juan Rossi
  241. kanemra
  242. Paul Pearce
  243. Pavel Savchenko
  244. Sean Wang
  245. Seungha Kim
  246. Zhaorong Ma
  247. .. _version-3.1.18:
  248. 3.1.18
  249. ======
  250. :release-date: 2015-04-22 05:30 P.M UTC
  251. :release-by: Ask Solem
  252. - **Requirements**
  253. - Now depends on :ref:`Kombu 3.0.25 <kombu:version-3.0.25>`.
  254. - Now depends on :mod:`billiard` 3.3.0.20.
  255. - **Django**: Now supports Django 1.8 (Issue #2536).
  256. Fix contributed by Bence Tamas and Mickaël Penhard.
  257. - **Results**: MongoDB result backend now compatible with pymongo 3.0.
  258. Fix contributed by Fatih Sucu.
  259. - **Tasks**: Fixed bug only happening when a task has multiple callbacks
  260. (Issue #2515).
  261. Fix contributed by NotSqrt.
  262. - **Commands**: Preload options now support ``--arg value`` syntax.
  263. Fix contributed by John Anderson.
  264. - **Compat**: A typo caused ``celery.log.setup_logging_subsystem`` to be
  265. undefined.
  266. Fix contributed by Gunnlaugur Thor Briem.
  267. - **init scripts**: The celerybeat generic init script now uses
  268. ``/bin/sh`` instead of bash (Issue #2496).
  269. Fix contributed by Jelle Verstraaten.
  270. - **Django**: Fixed a :exc:`TypeError` sometimes occurring in logging
  271. when validating models.
  272. Fix contributed by Alexander.
  273. - **Commands**: Worker now supports new ``--executable`` argument that can
  274. be used with ``--detach``.
  275. Contributed by Bert Vanderbauwhede.
  276. - **Canvas**: Fixed crash in chord unlock fallback task (Issue #2404).
  277. - **Worker**: Fixed rare crash occurring with ``--autoscale`` enabled
  278. (Issue #2411).
  279. - **Django**: Properly recycle worker Django database connections when the
  280. Django ``CONN_MAX_AGE`` setting is enabled (Issue #2453).
  281. Fix contributed by Luke Burden.
  282. .. _version-3.1.17:
  283. 3.1.17
  284. ======
  285. :release-date: 2014-11-19 03:30 P.M UTC
  286. :release-by: Ask Solem
  287. .. admonition:: Do not enable the :setting:`CELERYD_FORCE_EXECV` setting!
  288. Please review your configuration and disable this option if you're using the
  289. RabbitMQ or Redis transport.
  290. Keeping this option enabled after 3.1 means the async based prefork pool will
  291. be disabled, which can easily cause instability.
  292. - **Requirements**
  293. - Now depends on :ref:`Kombu 3.0.24 <kombu:version-3.0.24>`.
  294. Includes the new Qpid transport coming in Celery 3.2, backported to
  295. support those who may still require Python 2.6 compatibility.
  296. - Now depends on :mod:`billiard` 3.3.0.19.
  297. - ``celery[librabbitmq]`` now depends on librabbitmq 1.6.1.
  298. - **Task**: The timing of ETA/countdown tasks were off after the example ``LocalTimezone``
  299. implementation in the Python documentation no longer works in Python 3.4.
  300. (Issue #2306).
  301. - **Task**: Raising :exc:`~celery.exceptions.Ignore` no longer sends
  302. ``task-failed`` event (Issue #2365).
  303. - **Redis result backend**: Fixed unbound local errors.
  304. Fix contributed by Thomas French.
  305. - **Task**: Callbacks was not called properly if ``link`` was a list of
  306. signatures (Issuse #2350).
  307. - **Canvas**: chain and group now handles json serialized signatures
  308. (Issue #2076).
  309. - **Results**: ``.join_native()`` would accidentally treat the ``STARTED``
  310. state as being ready (Issue #2326).
  311. This could lead to the chord callback being called with invalid arguments
  312. when using chords with the :setting:`CELERY_TRACK_STARTED` setting
  313. enabled.
  314. - **Canvas**: The ``chord_size`` attribute is now set for all canvas primitives,
  315. making sure more combinations will work with the ``new_join`` optimization
  316. for Redis (Issue #2339).
  317. - **Task**: Fixed problem with app not being properly propagated to
  318. ``trace_task`` in all cases.
  319. Fix contributed by kristaps.
  320. - **Worker**: Expires from task message now associated with a timezone.
  321. Fix contributed by Albert Wang.
  322. - **Cassandra result backend**: Fixed problems when using detailed mode.
  323. When using the Cassandra backend in detailed mode, a regression
  324. caused errors when attempting to retrieve results.
  325. Fix contributed by Gino Ledesma.
  326. - **Mongodb Result backend**: Pickling the backend instance will now include
  327. the original url (Issue #2347).
  328. Fix contributed by Sukrit Khera.
  329. - **Task**: Exception info was not properly set for tasks raising
  330. :exc:`~celery.exceptions.Reject` (Issue #2043).
  331. - **Worker**: Duplicates are now removed when loading the set of revoked tasks
  332. from the worker state database (Issue #2336).
  333. - **celery.contrib.rdb**: Fixed problems with ``rdb.set_trace`` calling stop
  334. from the wrong frame.
  335. Fix contributed by llllllllll.
  336. - **Canvas**: ``chain`` and ``chord`` can now be immutable.
  337. - **Canvas**: ``chord.apply_async`` will now keep partial args set in
  338. ``self.args`` (Issue #2299).
  339. - **Results**: Small refactoring so that results are decoded the same way in
  340. all result backends.
  341. - **Logging**: The ``processName`` format was introduced in Py2.6.2 so for
  342. compatibility this format is now excluded when using earlier versions
  343. (Issue #1644).
  344. .. _version-3.1.16:
  345. 3.1.16
  346. ======
  347. :release-date: 2014-10-03 06:00 P.M UTC
  348. :release-by: Ask Solem
  349. - **Worker**: 3.1.15 broke ``-Ofair`` behavior (Issue #2286).
  350. This regression could result in all tasks executing
  351. in a single child process if ``-Ofair`` was enabled.
  352. - **Canvas**: ``celery.signature`` now properly forwards app argument
  353. in all cases.
  354. - **Task**: ``.retry()`` did not raise the exception correctly
  355. when called without a current exception.
  356. Fix contributed by Andrea Rabbaglietti.
  357. - **Worker**: The ``enable_events`` remote control command
  358. disabled worker-related events by mistake (Issue #2272).
  359. Fix contributed by Konstantinos Koukopoulos.
  360. - **Django**: Adds support for Django 1.7 class names in INSTALLED_APPS
  361. when using ``app.autodiscover_tasks()`` (Issue #2248).
  362. - **Sphinx**: ``celery.contrib.sphinx`` now uses ``getfullargspec``
  363. on Python 3 (Issue #2302).
  364. - **Redis/Cache Backends**: Chords will now run at most once if one or more tasks
  365. in the chord are executed multiple times for some reason.
  366. .. _version-3.1.15:
  367. 3.1.15
  368. ======
  369. :release-date: 2014-09-14 11:00 P.M UTC
  370. :release-by: Ask Solem
  371. - **Django**: Now makes sure ``django.setup()`` is called
  372. before importing any task modules (Django 1.7 compatibility, Issue #2227)
  373. - **Results**: ``result.get()`` was misbehaving by calling
  374. ``backend.get_task_meta`` in a finally call leading to
  375. AMQP result backend queues not being properly cleaned up (Issue #2245).
  376. .. _version-3.1.14:
  377. 3.1.14
  378. ======
  379. :release-date: 2014-09-08 03:00 P.M UTC
  380. :release-by: Ask Solem
  381. - **Requirements**
  382. - Now depends on :ref:`Kombu 3.0.22 <kombu:version-3.0.22>`.
  383. - **Init scripts**: The generic worker init scripts ``status`` command
  384. now gets an accurate pidfile list (Issue #1942).
  385. - **Init scripts**: The generic beat script now implements the ``status``
  386. command.
  387. Contributed by John Whitlock.
  388. - **Commands**: Multi now writes informational output to stdout instead of stderr.
  389. - **Worker**: Now ignores not implemented error for ``pool.restart``
  390. (Issue #2153).
  391. - **Task**: Retry no longer raises retry exception when executed in eager
  392. mode (Issue #2164).
  393. - **AMQP Result backend**: Now ensured ``on_interval`` is called at least
  394. every second for blocking calls to properly propagate parent errors.
  395. - **Django**: Compatibility with Django 1.7 on Windows (Issue #2126).
  396. - **Programs**: `--umask` argument can be now specified in both octal (if starting
  397. with 0) or decimal.
  398. .. _version-3.1.13:
  399. 3.1.13
  400. ======
  401. Security Fixes
  402. --------------
  403. * [Security: `CELERYSA-0002`_] Insecure default umask.
  404. The built-in utility used to daemonize the Celery worker service sets
  405. an insecure umask by default (umask 0).
  406. This means that any files or directories created by the worker will
  407. end up having world-writable permissions.
  408. Special thanks to Red Hat for originally discovering and reporting the
  409. issue!
  410. This version will no longer set a default umask by default, so if unset
  411. the umask of the parent process will be used.
  412. .. _`CELERYSA-0002`:
  413. http://github.com/celery/celery/tree/master/docs/sec/CELERYSA-0002.txt
  414. News
  415. ----
  416. - **Requirements**
  417. - Now depends on :ref:`Kombu 3.0.21 <kombu:version-3.0.21>`.
  418. - Now depends on :mod:`billiard` 3.3.0.18.
  419. - **App**: ``backend`` argument now also sets the :setting:`CELERY_RESULT_BACKEND`
  420. setting.
  421. - **Task**: ``signature_from_request`` now propagates ``reply_to`` so that
  422. the RPC backend works with retried tasks (Issue #2113).
  423. - **Task**: ``retry`` will no longer attempt to requeue the task if sending
  424. the retry message fails.
  425. Unrelated exceptions being raised could cause a message loop, so it was
  426. better to remove this behavior.
  427. - **Beat**: Accounts for standard 1ms drift by always waking up 0.010s
  428. earlier.
  429. This will adjust the latency so that the periodic tasks will not move
  430. 1ms after every invocation.
  431. - Documentation fixes
  432. Contributed by Yuval Greenfield, Lucas Wiman, nicholsonjf
  433. - **Worker**: Removed an outdated assert statement that could lead to errors
  434. being masked (Issue #2086).
  435. .. _version-3.1.12:
  436. 3.1.12
  437. ======
  438. :release-date: 2014-06-09 10:12 P.M UTC
  439. :release-by: Ask Solem
  440. - **Requirements**
  441. Now depends on :ref:`Kombu 3.0.19 <kombu:version-3.0.19>`.
  442. - **App**: Connections were not being closed after fork due to an error in the
  443. after fork handler (Issue #2055).
  444. This could manifest itself by causing framing errors when using RabbitMQ.
  445. (``Unexpected frame``).
  446. - **Django**: ``django.setup()`` was being called too late when
  447. using Django 1.7 (Issue #1802).
  448. - **Django**: Fixed problems with event timezones when using Django
  449. (``Substantial drift``).
  450. Celery did not take into account that Django modifies the
  451. ``time.timeone`` attributes and friends.
  452. - **Canvas**: ``Signature.link`` now works when the link option is a scalar
  453. value (Issue #2019).
  454. - **Prefork pool**: Fixed race conditions for when file descriptors are
  455. removed from the event loop.
  456. Fix contributed by Roger Hu.
  457. - **Prefork pool**: Improved solution for dividing tasks between child
  458. processes.
  459. This change should improve performance when there are many child
  460. processes, and also decrease the chance that two subsequent tasks are
  461. written to the same child process.
  462. - **Worker**: Now ignores unknown event types, instead of crashing.
  463. Fix contributed by Illes Solt.
  464. - **Programs**: :program:`celery worker --detach` no longer closes open file
  465. descriptors when :envvar:`C_FAKEFORK` is used so that the workers output
  466. can be seen.
  467. - **Programs**: The default working directory for :program:`celery worker
  468. --detach` is now the current working directory, not ``/``.
  469. - **Canvas**: ``signature(s, app=app)`` did not upgrade serialized signatures
  470. to their original class (``subtask_type``) when the ``app`` keyword argument
  471. was used.
  472. - **Control**: The ``duplicate nodename`` warning emitted by control commands
  473. now shows the duplicate node name.
  474. - **Tasks**: Can now call ``ResultSet.get()`` on a result set without members.
  475. Fix contributed by Alexey Kotlyarov.
  476. - **App**: Fixed strange traceback mangling issue for
  477. ``app.connection_or_acquire``.
  478. - **Programs**: The :program:`celery multi stopwait` command is now documented
  479. in usage.
  480. - **Other**: Fixed cleanup problem with ``PromiseProxy`` when an error is
  481. raised while trying to evaluate the promise.
  482. - **Other**: The utility used to censor configuration values now handles
  483. non-string keys.
  484. Fix contributed by Luke Pomfrey.
  485. - **Other**: The ``inspect conf`` command did not handle non-string keys well.
  486. Fix contributed by Jay Farrimond.
  487. - **Programs**: Fixed argument handling problem in
  488. :program:`celery worker --detach`.
  489. Fix contributed by Dmitry Malinovsky.
  490. - **Programs**: :program:`celery worker --detach` did not forward working
  491. directory option (Issue #2003).
  492. - **Programs**: :program:`celery inspect registered` no longer includes
  493. the list of built-in tasks.
  494. - **Worker**: The ``requires`` attribute for boot steps were not being handled
  495. correctly (Issue #2002).
  496. - **Eventlet**: The eventlet pool now supports the ``pool_grow`` and
  497. ``pool_shrink`` remote control commands.
  498. Contributed by Mher Movsisyan.
  499. - **Eventlet**: The eventlet pool now implements statistics for
  500. :program:``celery inspect stats``.
  501. Contributed by Mher Movsisyan.
  502. - **Documentation**: Clarified ``Task.rate_limit`` behavior.
  503. Contributed by Jonas Haag.
  504. - **Documentation**: ``AbortableTask`` examples now updated to use the new
  505. API (Issue #1993).
  506. - **Documentation**: The security documentation examples used an out of date
  507. import.
  508. Fix contributed by Ian Dees.
  509. - **Init scripts**: The CentOS init scripts did not quote
  510. :envvar:`CELERY_CHDIR`.
  511. Fix contributed by ffeast.
  512. .. _version-3.1.11:
  513. 3.1.11
  514. ======
  515. :release-date: 2014-04-16 11:00 P.M UTC
  516. :release-by: Ask Solem
  517. - **Now compatible with RabbitMQ 3.3.0**
  518. You need to run Celery 3.1.11 or later when using RabbitMQ 3.3,
  519. and if you use the ``librabbitmq`` module you also have to upgrade
  520. to librabbitmq 1.5.0:
  521. .. code-block:: bash
  522. $ pip install -U librabbitmq
  523. - **Requirements**:
  524. - Now depends on :ref:`Kombu 3.0.15 <kombu:version-3.0.15>`.
  525. - Now depends on `billiard 3.3.0.17`_.
  526. - Bundle ``celery[librabbitmq]`` now depends on :mod:`librabbitmq` 1.5.0.
  527. .. _`billiard 3.3.0.17`:
  528. https://github.com/celery/billiard/blob/master/CHANGES.txt
  529. - **Tasks**: The :setting:`CELERY_DEFAULT_DELIVERY_MODE` setting was being
  530. ignored (Issue #1953).
  531. - **Worker**: New :option:`--heartbeat-interval` can be used to change the
  532. time (in seconds) between sending event heartbeats.
  533. Contributed by Matthew Duggan and Craig Northway.
  534. - **App**: Fixed memory leaks occurring when creating lots of temporary
  535. app instances (Issue #1949).
  536. - **MongoDB**: SSL configuration with non-MongoDB transport breaks MongoDB
  537. results backend (Issue #1973).
  538. Fix contributed by Brian Bouterse.
  539. - **Logging**: The color formatter accidentally modified ``record.msg``
  540. (Issue #1939).
  541. - **Results**: Fixed problem with task trails being stored multiple times,
  542. causing ``result.collect()`` to hang (Issue #1936, Issue #1943).
  543. - **Results**: ``ResultSet`` now implements a ``.backend`` attribute for
  544. compatibility with ``AsyncResult``.
  545. - **Results**: ``.forget()`` now also clears the local cache.
  546. - **Results**: Fixed problem with multiple calls to ``result._set_cache``
  547. (Issue #1940).
  548. - **Results**: ``join_native`` populated result cache even if disabled.
  549. - **Results**: The YAML result serializer should now be able to handle storing
  550. exceptions.
  551. - **Worker**: No longer sends task error emails for expected errors (in
  552. ``@task(throws=(..., )))``.
  553. - **Canvas**: Fixed problem with exception deserialization when using
  554. the JSON serializer (Issue #1987).
  555. - **Eventlet**: Fixes crash when ``celery.contrib.batches`` attempted to
  556. cancel a non-existing timer (Issue #1984).
  557. - Can now import ``celery.version_info_t``, and ``celery.five`` (Issue #1968).
  558. .. _version-3.1.10:
  559. 3.1.10
  560. ======
  561. :release-date: 2014-03-22 09:40 P.M UTC
  562. :release-by: Ask Solem
  563. - **Requirements**:
  564. - Now depends on :ref:`Kombu 3.0.14 <kombu:version-3.0.14>`.
  565. - **Results**:
  566. Reliability improvements to the SQLAlchemy database backend. Previously the
  567. connection from the MainProcess was improperly shared with the workers.
  568. (Issue #1786)
  569. - **Redis:** Important note about events (Issue #1882).
  570. There is a new transport option for Redis that enables monitors
  571. to filter out unwanted events. Enabling this option in the workers
  572. will increase performance considerably:
  573. .. code-block:: python
  574. BROKER_TRANSPORT_OPTIONS = {'fanout_patterns': True}
  575. Enabling this option means that your workers will not be able to see
  576. workers with the option disabled (or is running an older version of
  577. Celery), so if you do enable it then make sure you do so on all
  578. nodes.
  579. See :ref:`redis-caveats`.
  580. This will be the default in Celery 3.2.
  581. - **Results**: The :class:`@AsyncResult` object now keeps a local cache
  582. of the final state of the task.
  583. This means that the global result cache can finally be disabled,
  584. and you can do so by setting :setting:`CELERY_MAX_CACHED_RESULTS` to
  585. :const:`-1`. The lifetime of the cache will then be bound to the
  586. lifetime of the result object, which will be the default behavior
  587. in Celery 3.2.
  588. - **Events**: The "Substantial drift" warning message is now logged once
  589. per node name only (Issue #1802).
  590. - **Worker**: Ability to use one log file per child process when using the
  591. prefork pool.
  592. This can be enabled by using the new ``%i`` and ``%I`` format specifiers
  593. for the log file name. See :ref:`worker-files-process-index`.
  594. - **Redis**: New experimental chord join implementation.
  595. This is an optimization for chords when using the Redis result backend,
  596. where the join operation is now considerably faster and using less
  597. resources than the previous strategy.
  598. The new option can be set in the result backend URL:
  599. CELERY_RESULT_BACKEND = 'redis://localhost?new_join=1'
  600. This must be enabled manually as it's incompatible
  601. with workers and clients not using it, so be sure to enable
  602. the option in all clients and workers if you decide to use it.
  603. - **Multi**: With ``-opt:index`` (e.g. :option:`-c:1`) the index now always refers
  604. to the position of a node in the argument list.
  605. This means that referring to a number will work when specifying a list
  606. of node names and not just for a number range:
  607. .. code-block:: bash
  608. celery multi start A B C D -c:1 4 -c:2-4 8
  609. In this example ``1`` refers to node A (as it's the first node in the
  610. list).
  611. - **Signals**: The sender argument to ``Signal.connect`` can now be a proxy
  612. object, which means that it can be used with the task decorator
  613. (Issue #1873).
  614. - **Task**: A regression caused the ``queue`` argument to ``Task.retry`` to be
  615. ignored (Issue #1892).
  616. - **App**: Fixed error message for :meth:`~@Celery.config_from_envvar`.
  617. Fix contributed by Dmitry Malinovsky.
  618. - **Canvas**: Chords can now contain a group of other chords (Issue #1921).
  619. - **Canvas**: Chords can now be combined when using the amqp result backend
  620. (a chord where the callback is also a chord).
  621. - **Canvas**: Calling ``result.get()`` for a chain task will now complete
  622. even if one of the tasks in the chain is ``ignore_result=True``
  623. (Issue #1905).
  624. - **Canvas**: Worker now also logs chord errors.
  625. - **Canvas**: A chord task raising an exception will now result in
  626. any errbacks (``link_error``) to the chord callback to also be called.
  627. - **Results**: Reliability improvements to the SQLAlchemy database backend
  628. (Issue #1786).
  629. Previously the connection from the ``MainProcess`` was improperly
  630. inherited by child processes.
  631. Fix contributed by Ionel Cristian Mărieș.
  632. - **Task**: Task callbacks and errbacks are now called using the group
  633. primitive.
  634. - **Task**: ``Task.apply`` now properly sets ``request.headers``
  635. (Issue #1874).
  636. - **Worker**: Fixed ``UnicodeEncodeError`` occuring when worker is started
  637. by `supervisord`.
  638. Fix contributed by Codeb Fan.
  639. - **Beat**: No longer attempts to upgrade a newly created database file
  640. (Issue #1923).
  641. - **Beat**: New setting :setting:``CELERYBEAT_SYNC_EVERY`` can be be used
  642. to control file sync by specifying the number of tasks to send between
  643. each sync.
  644. Contributed by Chris Clark.
  645. - **Commands**: :program:`celery inspect memdump` no longer crashes
  646. if the :mod:`psutil` module is not installed (Issue #1914).
  647. - **Worker**: Remote control commands now always accepts json serialized
  648. messages (Issue #1870).
  649. - **Worker**: Gossip will now drop any task related events it receives
  650. by mistake (Issue #1882).
  651. .. _version-3.1.9:
  652. 3.1.9
  653. =====
  654. :release-date: 2014-02-10 06:43 P.M UTC
  655. :release-by: Ask Solem
  656. - **Requirements**:
  657. - Now depends on :ref:`Kombu 3.0.12 <kombu:version-3.0.12>`.
  658. - **Prefork pool**: Better handling of exiting child processes.
  659. Fix contributed by Ionel Cristian Mărieș.
  660. - **Prefork pool**: Now makes sure all file descriptors are removed
  661. from the hub when a process is cleaned up.
  662. Fix contributed by Ionel Cristian Mărieș.
  663. - **New Sphinx extension**: for autodoc documentation of tasks:
  664. :mod:`celery.contrib.spinx` (Issue #1833).
  665. - **Django**: Now works with Django 1.7a1.
  666. - **Task**: Task.backend is now a property that forwards to ``app.backend``
  667. if no custom backend has been specified for the task (Issue #1821).
  668. - **Generic init scripts**: Fixed bug in stop command.
  669. Fix contributed by Rinat Shigapov.
  670. - **Generic init scripts**: Fixed compatibility with GNU :manpage:`stat`.
  671. Fix contributed by Paul Kilgo.
  672. - **Generic init scripts**: Fixed compatibility with the minimal
  673. :program:`dash` shell (Issue #1815).
  674. - **Commands**: The :program:`celery amqp basic.publish` command was not
  675. working properly.
  676. Fix contributed by Andrey Voronov.
  677. - **Commands**: Did no longer emit an error message if the pidfile exists
  678. and the process is still alive (Issue #1855).
  679. - **Commands**: Better error message for missing arguments to preload
  680. options (Issue #1860).
  681. - **Commands**: :program:`celery -h` did not work because of a bug in the
  682. argument parser (Issue #1849).
  683. - **Worker**: Improved error message for message decoding errors.
  684. - **Time**: Now properly parses the `Z` timezone specifier in ISO 8601 date
  685. strings.
  686. Fix contributed by Martin Davidsson.
  687. - **Worker**: Now uses the *negotiated* heartbeat value to calculate
  688. how often to run the heartbeat checks.
  689. - **Beat**: Fixed problem with beat hanging after the first schedule
  690. iteration (Issue #1822).
  691. Fix contributed by Roger Hu.
  692. - **Signals**: The header argument to :signal:`before_task_publish` is now
  693. always a dictionary instance so that signal handlers can add headers.
  694. - **Worker**: A list of message headers is now included in message related
  695. errors.
  696. .. _version-3.1.8:
  697. 3.1.8
  698. =====
  699. :release-date: 2014-01-17 10:45 P.M UTC
  700. :release-by: Ask Solem
  701. - **Requirements**:
  702. - Now depends on :ref:`Kombu 3.0.10 <kombu:version-3.0.10>`.
  703. - Now depends on `billiard 3.3.0.14`_.
  704. .. _`billiard 3.3.0.14`:
  705. https://github.com/celery/billiard/blob/master/CHANGES.txt
  706. - **Worker**: The event loop was not properly reinitialized at consumer restart
  707. which would force the worker to continue with a closed ``epoll`` instance on
  708. Linux, resulting in a crash.
  709. - **Events:** Fixed issue with both heartbeats and task events that could
  710. result in the data not being kept in sorted order.
  711. As a result this would force the worker to log "heartbeat missed"
  712. events even though the remote node was sending heartbeats in a timely manner.
  713. - **Results:** The pickle serializer no longer converts group results to tuples,
  714. and will keep the original type (*Issue #1750*).
  715. - **Results:** ``ResultSet.iterate`` is now pending deprecation.
  716. The method will be deprecated in version 3.2 and removed in version 3.3.
  717. Use ``result.get(callback=)`` (or ``result.iter_native()`` where available)
  718. instead.
  719. - **Worker**\|eventlet/gevent: A regression caused ``Ctrl+C`` to be ineffective
  720. for shutdown.
  721. - **Redis result backend:** Now using a pipeline to store state changes
  722. for improved performance.
  723. Contributed by Pepijn de Vos.
  724. - **Redis result backend:** Will now retry storing the result if disconnected.
  725. - **Worker**\|gossip: Fixed attribute error occurring when another node leaves.
  726. Fix contributed by Brodie Rao.
  727. - **Generic init scripts:** Now runs a check at startup to verify
  728. that any configuration scripts are owned by root and that they
  729. are not world/group writeable.
  730. The init script configuration is a shell script executed by root,
  731. so this is a preventive measure to ensure that users do not
  732. leave this file vulnerable to changes by unprivileged users.
  733. .. note::
  734. Note that upgrading celery will not update the init scripts,
  735. instead you need to manually copy the improved versions from the
  736. source distribution:
  737. https://github.com/celery/celery/tree/3.1/extra/generic-init.d
  738. - **Commands**: The :program:`celery purge` command now warns that the operation
  739. will delete all tasks and prompts the user for confirmation.
  740. A new :option:`-f` was added that can be used to disable
  741. interactive mode.
  742. - **Task**: ``.retry()`` did not raise the value provided in the ``exc`` argument
  743. when called outside of an error context (*Issue #1755*).
  744. - **Commands:** The :program:`celery multi` command did not forward command
  745. line configuration to the target workers.
  746. The change means that multi will forward the special ``--`` argument and
  747. configuration content at the end of the arguments line to the specified
  748. workers.
  749. Example using command-line configuration to set a broker heartbeat
  750. from :program:`celery multi`:
  751. .. code-block:: bash
  752. $ celery multi start 1 -c3 -- broker.heartbeat=30
  753. Fix contributed by Antoine Legrand.
  754. - **Canvas:** ``chain.apply_async()`` now properly forwards execution options.
  755. Fix contributed by Konstantin Podshumok.
  756. - **Redis result backend:** Now takes ``connection_pool`` argument that can be
  757. used to change the connection pool class/constructor.
  758. - **Worker:** Now truncates very long arguments and keyword arguments logged by
  759. the pool at debug severity.
  760. - **Worker:** The worker now closes all open files on :sig:`SIGHUP` (regression)
  761. (*Issue #1768*).
  762. Fix contributed by Brodie Rao
  763. - **Worker:** Will no longer accept remote control commands while the
  764. worker startup phase is incomplete (*Issue #1741*).
  765. - **Commands:** The output of the event dump utility
  766. (:program:`celery events -d`) can now be piped into other commands.
  767. - **Documentation:** The RabbitMQ installation instructions for OS X was
  768. updated to use modern homebrew practices.
  769. Contributed by Jon Chen.
  770. - **Commands:** The :program:`celery inspect conf` utility now works.
  771. - **Commands:** The :option:`-no-color` argument was not respected by
  772. all commands (*Issue #1799*).
  773. - **App:** Fixed rare bug with ``autodiscover_tasks()`` (*Issue #1797*).
  774. - **Distribution:** The sphinx docs will now always add the parent directory
  775. to path so that the current celery source code is used as a basis for
  776. API documentation (*Issue #1782*).
  777. - **Documentation:** Supervisord examples contained an extraneous '-' in a
  778. `--logfile` argument example.
  779. Fix contributed by Mohammad Almeer.
  780. .. _version-3.1.7:
  781. 3.1.7
  782. =====
  783. :release-date: 2013-12-17 06:00 P.M UTC
  784. :release-by: Ask Solem
  785. .. _v317-important:
  786. Important Notes
  787. ---------------
  788. Init script security improvements
  789. ---------------------------------
  790. Where the generic init scripts (for ``celeryd``, and ``celerybeat``) before
  791. delegated the responsibility of dropping privileges to the target application,
  792. it will now use ``su`` instead, so that the Python program is not trusted
  793. with superuser privileges.
  794. This is not in reaction to any known exploit, but it will
  795. limit the possibility of a privilege escalation bug being abused in the
  796. future.
  797. You have to upgrade the init scripts manually from this directory:
  798. https://github.com/celery/celery/tree/3.1/extra/generic-init.d
  799. AMQP result backend
  800. ~~~~~~~~~~~~~~~~~~~
  801. The 3.1 release accidentally left the amqp backend configured to be
  802. non-persistent by default.
  803. Upgrading from 3.0 would give a "not equivalent" error when attempting to
  804. set or retrieve results for a task. That is unless you manually set the
  805. persistence setting::
  806. CELERY_RESULT_PERSISTENT = True
  807. This version restores the previous value so if you already forced
  808. the upgrade by removing the existing exchange you must either
  809. keep the configuration by setting ``CELERY_RESULT_PERSISTENT = False``
  810. or delete the ``celeryresults`` exchange again.
  811. Synchronous subtasks
  812. ~~~~~~~~~~~~~~~~~~~~
  813. Tasks waiting for the result of a subtask will now emit
  814. a :exc:`RuntimeWarning` warning when using the prefork pool,
  815. and in 3.2 this will result in an exception being raised.
  816. It's not legal for tasks to block by waiting for subtasks
  817. as this is likely to lead to resource starvation and eventually
  818. deadlock when using the prefork pool (see also :ref:`task-synchronous-subtasks`).
  819. If you really know what you are doing you can avoid the warning (and
  820. the future exception being raised) by moving the operation in a whitelist
  821. block:
  822. .. code-block:: python
  823. from celery.result import allow_join_result
  824. @app.task
  825. def misbehaving():
  826. result = other_task.delay()
  827. with allow_join_result():
  828. result.get()
  829. Note also that if you wait for the result of a subtask in any form
  830. when using the prefork pool you must also disable the pool prefetching
  831. behavior with the worker :ref:`-Ofair option <prefork-pool-prefetch>`.
  832. .. _v317-fixes:
  833. Fixes
  834. -----
  835. - Now depends on :ref:`Kombu 3.0.8 <kombu:version-3.0.8>`.
  836. - Now depends on :mod:`billiard` 3.3.0.13
  837. - Events: Fixed compatibility with non-standard json libraries
  838. that sends float as :class:`decimal.Decimal` (Issue #1731)
  839. - Events: State worker objects now always defines attributes:
  840. ``active``, ``processed``, ``loadavg``, ``sw_ident``, ``sw_ver``
  841. and ``sw_sys``.
  842. - Worker: Now keeps count of the total number of tasks processed,
  843. not just by type (``all_active_count``).
  844. - Init scripts: Fixed problem with reading configuration file
  845. when the init script is symlinked to a runlevel (e.g. ``S02celeryd``).
  846. (Issue #1740).
  847. This also removed a rarely used feature where you can symlink the script
  848. to provide alternative configurations. You instead copy the script
  849. and give it a new name, but perhaps a better solution is to provide
  850. arguments to ``CELERYD_OPTS`` to separate them:
  851. .. code-block:: bash
  852. CELERYD_NODES="X1 X2 Y1 Y2"
  853. CELERYD_OPTS="-A:X1 x -A:X2 x -A:Y1 y -A:Y2 y"
  854. - Fallback chord unlock task is now always called after the chord header
  855. (Issue #1700).
  856. This means that the unlock task will not be started if there's
  857. an error sending the header.
  858. - Celery command: Fixed problem with arguments for some control commands.
  859. Fix contributed by Konstantin Podshumok.
  860. - Fixed bug in ``utcoffset`` where the offset when in DST would be
  861. completely wrong (Issue #1743).
  862. - Worker: Errors occurring while attempting to serialize the result of a
  863. task will now cause the task to be marked with failure and a
  864. :class:`kombu.exceptions.EncodingError` error.
  865. Fix contributed by Ionel Cristian Mărieș.
  866. - Worker with ``-B`` argument did not properly shut down the beat instance.
  867. - Worker: The ``%n`` and ``%h`` formats are now also supported by the
  868. :option:`--logfile`, :option:`--pidfile` and :option:`--statedb` arguments.
  869. Example:
  870. .. code-block:: bash
  871. $ celery -A proj worker -n foo@%h --logfile=%n.log --statedb=%n.db
  872. - Redis/Cache result backends: Will now timeout if keys evicted while trying
  873. to join a chord.
  874. - The fallbock unlock chord task now raises :exc:`Retry` so that the
  875. retry even is properly logged by the worker.
  876. - Multi: Will no longer apply Eventlet/gevent monkey patches (Issue #1717).
  877. - Redis result backend: Now supports UNIX sockets.
  878. Like the Redis broker transport the result backend now also supports
  879. using ``redis+socket:///tmp/redis.sock`` URLs.
  880. Contributed by Alcides Viamontes Esquivel.
  881. - Events: Events sent by clients was mistaken for worker related events
  882. (Issue #1714).
  883. For ``events.State`` the tasks now have a ``Task.client`` attribute
  884. that is set when a ``task-sent`` event is being received.
  885. Also, a clients logical clock is not in sync with the cluster so
  886. they live in a "time bubble". So for this reason monitors will no
  887. longer attempt to merge with the clock of an event sent by a client,
  888. instead it will fake the value by using the current clock with
  889. a skew of -1.
  890. - Prefork pool: The method used to find terminated processes was flawed
  891. in that it did not also take into account missing popen objects.
  892. - Canvas: ``group`` and ``chord`` now works with anon signatures as long
  893. as the group/chord object is associated with an app instance (Issue #1744).
  894. You can pass the app by using ``group(..., app=app)``.
  895. .. _version-3.1.6:
  896. 3.1.6
  897. =====
  898. :release-date: 2013-12-02 06:00 P.M UTC
  899. :release-by: Ask Solem
  900. - Now depends on :mod:`billiard` 3.3.0.10.
  901. - Now depends on :ref:`Kombu 3.0.7 <kombu:version-3.0.7>`.
  902. - Fixed problem where Mingle caused the worker to hang at startup
  903. (Issue #1686).
  904. - Beat: Would attempt to drop privileges twice (Issue #1708).
  905. - Windows: Fixed error with ``geteuid`` not being available (Issue #1676).
  906. - Tasks can now provide a list of expected error classes (Issue #1682).
  907. The list should only include errors that the task is expected to raise
  908. during normal operation::
  909. @task(throws=(KeyError, HttpNotFound))
  910. What happens when an exceptions is raised depends on the type of error:
  911. - Expected errors (included in ``Task.throws``)
  912. Will be logged using severity ``INFO``, and traceback is excluded.
  913. - Unexpected errors
  914. Will be logged using severity ``ERROR``, with traceback included.
  915. - Cache result backend now compatible with Python 3 (Issue #1697).
  916. - CentOS init script: Now compatible with sys-v style init symlinks.
  917. Fix contributed by Jonathan Jordan.
  918. - Events: Fixed problem when task name is not defined (Issue #1710).
  919. Fix contributed by Mher Movsisyan.
  920. - Task: Fixed unbound local errors (Issue #1684).
  921. Fix contributed by Markus Ullmann.
  922. - Canvas: Now unrolls groups with only one task (optimization) (Issue #1656).
  923. - Task: Fixed problem with eta and timezones.
  924. Fix contributed by Alexander Koval.
  925. - Django: Worker now performs model validation (Issue #1681).
  926. - Task decorator now emits less confusing errors when used with
  927. incorrect arguments (Issue #1692).
  928. - Task: New method ``Task.send_event`` can be used to send custom events
  929. to Flower and other monitors.
  930. - Fixed a compatibility issue with non-abstract task classes
  931. - Events from clients now uses new node name format (``gen<pid>@<hostname>``).
  932. - Fixed rare bug with Callable not being defined at interpreter shutdown
  933. (Issue #1678).
  934. Fix contributed by Nick Johnson.
  935. - Fixed Python 2.6 compatibility (Issue #1679).
  936. .. _version-3.1.5:
  937. 3.1.5
  938. =====
  939. :release-date: 2013-11-21 06:20 P.M UTC
  940. :release-by: Ask Solem
  941. - Now depends on :ref:`Kombu 3.0.6 <kombu:version-3.0.6>`.
  942. - Now depends on :mod:`billiard` 3.3.0.8
  943. - App: ``config_from_object`` is now lazy (Issue #1665).
  944. - App: ``autodiscover_tasks`` is now lazy.
  945. Django users should now wrap access to the settings object
  946. in a lambda::
  947. app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
  948. this ensures that the settings object is not prepared
  949. prematurely.
  950. - Fixed regression for ``--app`` argument experienced by
  951. some users (Issue #1653).
  952. - Worker: Now respects the ``--uid`` and ``--gid`` arguments
  953. even if ``--detach`` is not enabled.
  954. - Beat: Now respects the ``--uid`` and ``--gid`` arguments
  955. even if ``--detach`` is not enabled.
  956. - Python 3: Fixed unorderable error occuring with the worker ``-B``
  957. argument enabled.
  958. - ``celery.VERSION`` is now a named tuple.
  959. - ``maybe_signature(list)`` is now applied recursively (Issue #1645).
  960. - ``celery shell`` command: Fixed ``IPython.frontend`` deprecation warning.
  961. - The default app no longer includes the builtin fixups.
  962. This fixes a bug where ``celery multi`` would attempt
  963. to load the Django settings module before entering
  964. the target working directory.
  965. - The Django daemonization tutorial was changed.
  966. Users no longer have to explicitly export ``DJANGO_SETTINGS_MODULE``
  967. in :file:`/etc/default/celeryd` when the new project layout is used.
  968. - Redis result backend: expiry value can now be 0 (Issue #1661).
  969. - Censoring settings now accounts for non-string keys (Issue #1663).
  970. - App: New ``autofinalize`` option.
  971. Apps are automatically finalized when the task registry is accessed.
  972. You can now disable this behavior so that an exception is raised
  973. instead.
  974. Example:
  975. .. code-block:: python
  976. app = Celery(autofinalize=False)
  977. # raises RuntimeError
  978. tasks = app.tasks
  979. @app.task
  980. def add(x, y):
  981. return x + y
  982. # raises RuntimeError
  983. add.delay(2, 2)
  984. app.finalize()
  985. # no longer raises:
  986. tasks = app.tasks
  987. add.delay(2, 2)
  988. - The worker did not send monitoring events during shutdown.
  989. - Worker: Mingle and gossip is now automatically disabled when
  990. used with an unsupported transport (Issue #1664).
  991. - ``celery`` command: Preload options now supports
  992. the rare ``--opt value`` format (Issue #1668).
  993. - ``celery`` command: Accidentally removed options
  994. appearing before the subcommand, these are now moved to the end
  995. instead.
  996. - Worker now properly responds to ``inspect stats`` commands
  997. even if received before startup is complete (Issue #1659).
  998. - :signal:`task_postrun` is now sent within a finally block, to make
  999. sure the signal is always sent.
  1000. - Beat: Fixed syntax error in string formatting.
  1001. Contributed by nadad.
  1002. - Fixed typos in the documentation.
  1003. Fixes contributed by Loic Bistuer, sunfinite.
  1004. - Nested chains now works properly when constructed using the
  1005. ``chain`` type instead of the ``|`` operator (Issue #1656).
  1006. .. _version-3.1.4:
  1007. 3.1.4
  1008. =====
  1009. :release-date: 2013-11-15 11:40 P.M UTC
  1010. :release-by: Ask Solem
  1011. - Now depends on :ref:`Kombu 3.0.5 <kombu:version-3.0.5>`.
  1012. - Now depends on :mod:`billiard` 3.3.0.7
  1013. - Worker accidentally set a default socket timeout of 5 seconds.
  1014. - Django: Fixup now sets the default app so that threads will use
  1015. the same app instance (e.g. for manage.py runserver).
  1016. - Worker: Fixed Unicode error crash at startup experienced by some users.
  1017. - Calling ``.apply_async`` on an empty chain now works again (Issue #1650).
  1018. - The ``celery multi show`` command now generates the same arguments
  1019. as the start command does.
  1020. - The ``--app`` argument could end up using a module object instead
  1021. of an app instance (with a resulting crash).
  1022. - Fixed a syntax error problem in the celerybeat init script.
  1023. Fix contributed by Vsevolod.
  1024. - Tests now passing on PyPy 2.1 and 2.2.
  1025. .. _version-3.1.3:
  1026. 3.1.3
  1027. =====
  1028. :release-date: 2013-11-13 00:55 A.M UTC
  1029. :release-by: Ask Solem
  1030. - Fixed compatibility problem with Python 2.7.0 - 2.7.5 (Issue #1637)
  1031. ``unpack_from`` started supporting ``memoryview`` arguments
  1032. in Python 2.7.6.
  1033. - Worker: :option:`-B` argument accidentally closed files used
  1034. for logging.
  1035. - Task decorated tasks now keep their docstring (Issue #1636)
  1036. .. _version-3.1.2:
  1037. 3.1.2
  1038. =====
  1039. :release-date: 2013-11-12 08:00 P.M UTC
  1040. :release-by: Ask Solem
  1041. - Now depends on :mod:`billiard` 3.3.0.6
  1042. - No longer needs the billiard C extension to be installed.
  1043. - The worker silently ignored task errors.
  1044. - Django: Fixed ``ImproperlyConfigured`` error raised
  1045. when no database backend specified.
  1046. Fix contributed by j0hnsmith
  1047. - Prefork pool: Now using ``_multiprocessing.read`` with ``memoryview``
  1048. if available.
  1049. - ``close_open_fds`` now uses ``os.closerange`` if available.
  1050. - ``get_fdmax`` now takes value from ``sysconfig`` if possible.
  1051. .. _version-3.1.1:
  1052. 3.1.1
  1053. =====
  1054. :release-date: 2013-11-11 06:30 P.M UTC
  1055. :release-by: Ask Solem
  1056. - Now depends on :mod:`billiard` 3.3.0.4.
  1057. - Python 3: Fixed compatibility issues.
  1058. - Windows: Accidentally showed warning that the billiard C extension
  1059. was not installed (Issue #1630).
  1060. - Django: Tutorial updated with a solution that sets a default
  1061. :envvar:`DJANGO_SETTINGS_MODULE` so that it doesn't have to be typed
  1062. in with the :program:`celery` command.
  1063. Also fixed typos in the tutorial, and added the settings
  1064. required to use the Django database backend.
  1065. Thanks to Chris Ward, orarbel.
  1066. - Django: Fixed a problem when using the Django settings in Django 1.6.
  1067. - Django: Fixup should not be applied if the django loader is active.
  1068. - Worker: Fixed attribute error for ``human_write_stats`` when using the
  1069. compatibility prefork pool implementation.
  1070. - Worker: Fixed compatibility with billiard without C extension.
  1071. - Inspect.conf: Now supports a ``with_defaults`` argument.
  1072. - Group.restore: The backend argument was not respected.
  1073. .. _version-3.1.0:
  1074. 3.1.0
  1075. =======
  1076. :release-date: 2013-11-09 11:00 P.M UTC
  1077. :release-by: Ask Solem
  1078. See :ref:`whatsnew-3.1`.