changelog-3.1.rst 51 KB

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