changelog-3.0.rst 80 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656
  1. .. _changelog-3.0:
  2. ================
  3. Change history
  4. ================
  5. .. contents::
  6. :local:
  7. If you're looking for versions prior to 3.0.x you should go to :ref:`history`.
  8. .. _version-3.0.20:
  9. 3.0.20
  10. ======
  11. :release-date: 2013-06-26 16:00 P.M BST
  12. - Now depends on :ref:`Kombu 2.5.11 <kombu:version-2.5.11>`.
  13. - ``--loader`` argument no longer supported importing loaders from the
  14. current directory.
  15. - [Worker] Fixed memory leak when restarting after connection lost
  16. (Issue #1325).
  17. - [Worker] Fixed unicode decode error at startup (Issue #1373).
  18. Fix contributed by Jessica Tallon.
  19. - [Worker] Now properly rewrites unpickleable exceptions again.
  20. - Fixed possible race condition when evicting items from the revoked task set.
  21. - [generic-init.d] Fixed compatibility with Ubuntu's minimal Dash
  22. shell (Issue #1387).
  23. Fix contributed by monkut.
  24. - ``Task.apply``/``ALWAYS_EAGER`` now also executes callbacks and errbacks
  25. (Issue #1336).
  26. - [Worker] The :signal:`worker-shutdown` signal was no longer being dispatched
  27. (Issue #1339).
  28. - [Python 3] Fixed problem with threading.Event.
  29. Fix contributed by Xavier Ordoquy.
  30. - [Python 3] Now handles ``io.UnsupportedOperation`` that may be raised
  31. by ``file.fileno()`` in Python 3.
  32. - [MongoDB backend] No longer uses deprecated ``safe`` parameter.
  33. Fix contributed by rfkrocktk
  34. - [Canvas] Fixed regression where immutable chord members may receive
  35. arguments (Issue #1340).
  36. Fix contributed by Peter Brook.
  37. - [Canvas] chain now accepts generator argument again (Issue #1319).
  38. - ``celery.migrate`` command now consumes from all queues if no queues
  39. specified.
  40. Fix contributed by John Watson.
  41. .. _version-3.0.19:
  42. 3.0.19
  43. ======
  44. :release-date: 2013-04-17 04:30:00 P.M BST
  45. - Now depends on :mod:`billiard` 2.7.3.28
  46. - A Python 3 related fix managed to disable the deadlock fix
  47. announced in 3.0.18.
  48. Tests have been added to make sure this does not happen again.
  49. - Task retry policy: Default max_retries is now 3.
  50. This ensures clients will not be hanging while the broker is down.
  51. .. note::
  52. You can set a longer retry for the worker by
  53. using the :signal:`celeryd_after_setup` signal:
  54. .. code-block:: python
  55. from celery.signals import celeryd_after_setup
  56. @celeryd_after_setup.connect
  57. def configure_worker(instance, conf, **kwargs):
  58. conf.CELERY_TASK_PUBLISH_RETRY_POLICY = {
  59. 'max_retries': 100,
  60. 'interval_start': 0,
  61. 'interval_max': 1,
  62. 'interval_step': 0.2,
  63. }
  64. - Worker: Will now properly display message body in error messages
  65. even if the body is a buffer instance.
  66. - 3.0.18 broke the MongoDB result backend (Issue #1303).
  67. .. _version-3.0.18:
  68. 3.0.18
  69. ======
  70. :release-date: 2013-04-12 05:00:00 P.M BST
  71. - Now depends on :mod:`kombu` 2.5.10.
  72. See the :ref:`kombu changelog <kombu:version-2.5.10>`.
  73. - Now depends on :mod:`billiard` 2.7.3.26.
  74. - Can now specify a whitelist of accepted serializers using
  75. the new :setting:`CELERY_ACCEPT_CONTENT` setting.
  76. This means that you can force the worker to discard messages
  77. serialized with pickle and other untrusted serializers.
  78. For example to only allow JSON serialized messages use::
  79. CELERY_ACCEPT_CONTENT = ['json']
  80. you can also specify MIME types in the whitelist::
  81. CELERY_ACCEPT_CONTENT = ['application/json']
  82. - Fixed deadlock in multiprocessing's pool caused by the
  83. semaphore not being released when terminated by signal.
  84. - Processes Pool: It's now possible to debug pool processes using GDB.
  85. - ``celery report`` now censors possibly secret settings, like passwords
  86. and secret tokens.
  87. You should still check the output before pasting anything
  88. on the internet.
  89. - Connection URLs now ignore multiple '+' tokens.
  90. - Worker/statedb: Now uses pickle protocol 2 (Py2.5+)
  91. - Fixed Python 3 compatibility issues.
  92. - Worker: A warning is now given if a worker is started with the
  93. same node name as an existing worker.
  94. - Worker: Fixed a deadlock that could occur while revoking tasks (Issue #1297).
  95. - Worker: The :sig:`HUP` handler now closes all open file descriptors
  96. before restarting to ensure file descriptors does not leak (Issue #1270).
  97. - Worker: Optimized storing/loading the revoked tasks list (Issue #1289).
  98. After this change the ``--statedb`` file will take up more disk space,
  99. but loading from and storing the revoked tasks will be considerably
  100. faster (what before took 5 minutes will now take less than a second).
  101. - Celery will now suggest alternatives if there's a typo in the
  102. broker transport name (e.g. ``ampq`` -> ``amqp``).
  103. - Worker: The auto-reloader would cause a crash if a monitored file
  104. was unlinked.
  105. Fix contributed by Agris Ameriks.
  106. - Fixed AsyncResult pickling error.
  107. Fix contributed by Thomas Minor.
  108. - Fixed handling of Unicode in logging output when using log colors
  109. (Issue #427).
  110. - :class:`~celery.app.utils.ConfigurationView` is now a ``MutableMapping``.
  111. Contributed by Aaron Harnly.
  112. - Fixed memory leak in LRU cache implementation.
  113. Fix contributed by Romuald Brunet.
  114. - ``celery.contrib.rdb``: Now works when sockets are in non-blocking mode.
  115. Fix contributed by Theo Spears.
  116. - The `inspect reserved` remote control command included active (started) tasks
  117. with the reserved tasks (Issue #1030).
  118. - The :signal:`task_failure` signal received a modified traceback object
  119. meant for pickling purposes, this has been fixed so that it now
  120. receives the real traceback instead.
  121. - The ``@task`` decorator silently ignored positional arguments,
  122. it now raises the expected :exc:`TypeError` instead (Issue #1125).
  123. - The worker will now properly handle messages with invalid
  124. eta/expires fields (Issue #1232).
  125. - The ``pool_restart`` remote control command now reports
  126. an error if the :setting:`CELERYD_POOL_RESTARTS` setting is not set.
  127. - ``celery.conf.add_defaults`` can now be used with non-dict objects.
  128. - Fixed compatibility problems in the Proxy class (Issue #1087).
  129. The class attributes ``__module__``, ``__name__`` and ``__doc__``
  130. are now meaningful string objects.
  131. Thanks to Marius Gedminas.
  132. - MongoDB Backend: The :setting:`MONGODB_BACKEND_SETTINGS` setting
  133. now accepts a ``option`` key that lets you forward arbitrary kwargs
  134. to the underlying ``pymongo.Connection`` object (Issue #1015).
  135. - Beat: The daily backend cleanup task is no longer enabled
  136. for result backends that support automatic result expiration (Issue #1031).
  137. - Canvas list operations now takes application instance from the first
  138. task in the list, instead of depending on the ``current_app`` (Issue #1249).
  139. - Worker: Message decoding error log message now includes traceback
  140. information.
  141. - Worker: The startup banner now includes system platform.
  142. - ``celery inspect|status|control`` now gives an error if used
  143. with an SQL based broker transport.
  144. .. _version-3.0.17:
  145. 3.0.17
  146. ======
  147. :release-date: 2013-03-22 04:00:00 P.M UTC
  148. - Now depends on kombu 2.5.8
  149. - Now depends on billiard 2.7.3.23
  150. - RabbitMQ/Redis: thread-less and lock-free rate-limit implementation.
  151. This means that rate limits pose minimal overhead when used with
  152. RabbitMQ/Redis or future transports using the eventloop,
  153. and that the rate-limit implementation is now thread-less and lock-free.
  154. The thread-based transports will still use the old implementation for
  155. now, but the plan is to use the timer also for other
  156. broker transports in Celery 3.1.
  157. - Rate limits now works with eventlet/gevent if using RabbitMQ/Redis as the
  158. broker.
  159. - A regression caused ``task.retry`` to ignore additional keyword arguments.
  160. Extra keyword arguments are now used as execution options again.
  161. Fix contributed by Simon Engledew.
  162. - Windows: Fixed problem with the worker trying to pickle the Django settings
  163. module at worker startup.
  164. - generic-init.d: No longer double quotes ``$CELERYD_CHDIR`` (Issue #1235).
  165. - generic-init.d: Removes bash-specific syntax.
  166. Fix contributed by Pär Wieslander.
  167. - Cassandra Result Backend: Now handles the
  168. :exc:`~pycassa.AllServersUnavailable` error (Issue #1010).
  169. Fix contributed by Jared Biel.
  170. - Result: Now properly forwards apps to GroupResults when deserializing
  171. (Issue #1249).
  172. Fix contributed by Charles-Axel Dein.
  173. - ``GroupResult.revoke`` now supports the ``terminate`` and ``signal``
  174. keyword arguments.
  175. - Worker: Multiprocessing pool workers now import task modules/configuration
  176. before setting up the logging system so that logging signals can be
  177. connected before they're dispatched.
  178. - chord: The ``AsyncResult`` instance returned now has its ``parent``
  179. attribute set to the header ``GroupResult``.
  180. This is consistent with how ``chain`` works.
  181. .. _version-3.0.16:
  182. 3.0.16
  183. ======
  184. :release-date: 2013-03-07 04:00:00 P.M UTC
  185. - Happy International Women's Day!
  186. We have a long way to go, so this is a chance for you to get involved in one
  187. of the organizations working for making our communities more
  188. diverse.
  189. - PyLadies — http://pyladies.com
  190. - Girls Who Code — http://www.girlswhocode.com
  191. - Women Who Code — http://www.meetup.com/Women-Who-Code-SF/
  192. - Now depends on :mod:`kombu` version 2.5.7
  193. - Now depends on :mod:`billiard` version 2.7.3.22
  194. - AMQP heartbeats are now disabled by default.
  195. Some users experiences issues with heartbeats enabled,
  196. and it's not strictly necessary to use them.
  197. If you're experiencing problems detecting connection failures,
  198. you can re-enable heartbeats by configuring the :setting:`BROKER_HEARTBEAT`
  199. setting.
  200. - Worker: Now propagates connection errors occurring in multiprocessing
  201. callbacks, so that the connection can be reset (Issue #1226).
  202. - Worker: Now propagates connection errors occurring in timer callbacks,
  203. so that the connection can be reset.
  204. - The modules in :setting:`CELERY_IMPORTS` and :setting:`CELERY_INCLUDE`
  205. are now imported in the original order (Issue #1161).
  206. The modules in :setting:`CELERY_IMPORTS` will be imported first,
  207. then continued by :setting:`CELERY_INCLUDE`.
  208. Thanks to Joey Wilhelm.
  209. - New bash completion for ``celery`` available in the git repository:
  210. https://github.com/celery/celery/tree/3.0/extra/bash-completion
  211. You can source this file or put it in ``bash_completion.d`` to
  212. get auto-completion for the ``celery`` command-line utility.
  213. - The node name of a worker can now include unicode characters (Issue #1186).
  214. - The repr of a ``crontab`` object now displays correctly (Issue #972).
  215. - ``events.State`` no longer modifies the original event dictionary.
  216. - No longer uses ``Logger.warn`` deprecated in Python 3.
  217. - Cache Backend: Now works with chords again (Issue #1094).
  218. - Chord unlock now handles errors occurring while calling the callback.
  219. - Generic worker init.d script: Status check is now performed by
  220. querying the pid of the instance instead of sending messages.
  221. Contributed by Milen Pavlov.
  222. - Improved init scripts for CentOS.
  223. - Updated to support celery 3.x conventions.
  224. - Now uses CentOS built-in ``status`` and ``killproc``
  225. - Support for multi-node / multi-pid worker services.
  226. - Standard color-coded CentOS service-init output.
  227. - A test suite.
  228. Contributed by Milen Pavlov.
  229. - ``ResultSet.join`` now always works with empty result set (Issue #1219).
  230. - A ``group`` consisting of a single task is now supported (Issue #1219).
  231. - Now supports the ``pycallgraph`` program (Issue #1051).
  232. - Fixed Jython compatibility problems.
  233. - Django tutorial: Now mentions that the example app must be added to
  234. ``INSTALLED_APPS`` (Issue #1192).
  235. .. _version-3.0.15:
  236. 3.0.15
  237. ======
  238. :release-date: 2013-02-11 04:30:00 P.M UTC
  239. - Now depends on billiard 2.7.3.21 which fixed a syntax error crash.
  240. - Fixed bug with :setting:`CELERY_SEND_TASK_SENT_EVENT`.
  241. .. _version-3.0.14:
  242. 3.0.14
  243. ======
  244. :release-date: 2013-02-08 05:00:00 P.M UTC
  245. - Now depends on Kombu 2.5.6
  246. - Now depends on billiard 2.7.3.20
  247. - ``execv`` is now disabled by default.
  248. It was causing too many problems for users, you can still enable
  249. it using the :setting:`CELERYD_FORCE_EXECV` setting.
  250. execv was only enabled when transports other than amqp/redis was used,
  251. and it's there to prevent deadlocks caused by mutexes not being released
  252. before the process forks. Sadly it also changes the environment
  253. introducing many corner case bugs that is hard to fix without adding
  254. horrible hacks. Deadlock issues are reported far less often than the
  255. bugs that execv are causing, so we now disable it by default.
  256. Work is in motion to create non-blocking versions of these transports
  257. so that execv is not necessary (which is the situation with the amqp
  258. and redis broker transports)
  259. - Chord exception behavior defined (Issue #1172).
  260. From Celery 3.1 the chord callback will change state to FAILURE
  261. when a task part of a chord raises an exception.
  262. It was never documented what happens in this case,
  263. and the actual behavior was very unsatisfactory, indeed
  264. it will just forward the exception value to the chord callback.
  265. For backward compatibility reasons we do not change to the new
  266. behavior in a bugfix release, even if the current behavior was
  267. never documented. Instead you can enable the
  268. :setting:`CELERY_CHORD_PROPAGATES` setting to get the new behavior
  269. that will be default from Celery 3.1.
  270. See more at :ref:`chord-errors`.
  271. - worker: Fixes bug with ignored and retried tasks.
  272. The ``on_chord_part_return`` and ``Task.after_return`` callbacks,
  273. nor the ``task_postrun`` signal should be called when the task was
  274. retried/ignored.
  275. Fix contributed by Vlad.
  276. - ``GroupResult.join_native`` now respects the ``propagate`` argument.
  277. - ``subtask.id`` added as an alias to ``subtask['options'].id``
  278. .. code-block:: python
  279. >>> s = add.s(2, 2)
  280. >>> s.id = 'my-id'
  281. >>> s['options']
  282. {'task_id': 'my-id'}
  283. >>> s.id
  284. 'my-id'
  285. - worker: Fixed error `Could not start worker processes` occurring
  286. when restarting after connection failure (Issue #1118).
  287. - Adds new signal :signal:`task-retried` (Issue #1169).
  288. - `celery events --dumper` now handles connection loss.
  289. - Will now retry sending the task-sent event in case of connection failure.
  290. - amqp backend: Now uses ``Message.requeue`` instead of republishing
  291. the message after poll.
  292. - New :setting:`BROKER_HEARTBEAT_CHECKRATE` setting introduced to modify the
  293. rate at which broker connection heartbeats are monitored.
  294. The default value was also changed from 3.0 to 2.0.
  295. - :class:`celery.events.state.State` is now pickleable.
  296. Fix contributed by Mher Movsisyan.
  297. - :class:`celery.datastructures.LRUCache` is now pickleable.
  298. Fix contributed by Mher Movsisyan.
  299. - The stats broadcast command now includes the workers pid.
  300. Contributed by Mher Movsisyan.
  301. - New ``conf`` remote control command to get a workers current configuration.
  302. Contributed by Mher Movsisyan.
  303. - Adds the ability to modify the chord unlock task's countdown
  304. argument (Issue #1146).
  305. Contributed by Jun Sakai
  306. - beat: The scheduler now uses the `now()`` method of the schedule,
  307. so that schedules can provide a custom way to get the current date and time.
  308. Contributed by Raphaël Slinckx
  309. - Fixed pickling of configuration modules on Windows or when execv is used
  310. (Issue #1126).
  311. - Multiprocessing logger is now configured with loglevel ``ERROR``
  312. by default.
  313. Since 3.0 the multiprocessing loggers were disabled by default
  314. (only configured when the :envvar:`MP_LOG` environment variable was set).
  315. .. _version-3.0.13:
  316. 3.0.13
  317. ======
  318. :release-date: 2013-01-07 04:00:00 P.M UTC
  319. - Now depends on Kombu 2.5
  320. - py-amqp has replaced amqplib as the default transport,
  321. gaining support for AMQP 0.9, and the RabbitMQ extensions
  322. including Consumer Cancel Notifications and heartbeats.
  323. - support for multiple connection URLs for failover.
  324. - Read more in the `Kombu 2.5 changelog`_.
  325. .. _`Kombu 2.5 changelog`:
  326. http://kombu.readthedocs.org/en/latest/changelog.html#version-2-5-0
  327. - Now depends on billiard 2.7.3.19
  328. - Fixed a deadlock issue that could occur when the producer pool
  329. inherited the connection pool instance of the parent process.
  330. - The :option:`--loader` option now works again (Issue #1066).
  331. - :program:`celery` umbrella command: All subcommands now supports
  332. the :option:`--workdir` option (Issue #1063).
  333. - Groups included in chains now give GroupResults (Issue #1057)
  334. Previously it would incorrectly add a regular result instead of a group
  335. result, but now this works:
  336. .. code-block:: python
  337. # [4 + 4, 4 + 8, 16 + 8]
  338. >>> res = (add.s(2, 2) | group(add.s(4), add.s(8), add.s(16)))()
  339. >>> res
  340. <GroupResult: a0acf905-c704-499e-b03a-8d445e6398f7 [
  341. 4346501c-cb99-4ad8-8577-12256c7a22b1,
  342. b12ead10-a622-4d44-86e9-3193a778f345,
  343. 26c7a420-11f3-4b33-8fac-66cd3b62abfd]>
  344. - Chains can now chain other chains and use partial arguments (Issue #1057).
  345. Example:
  346. .. code-block:: python
  347. >>> c1 = (add.s(2) | add.s(4))
  348. >>> c2 = (add.s(8) | add.s(16))
  349. >>> c3 = (c1 | c2)
  350. # 8 + 2 + 4 + 8 + 16
  351. >>> assert c3(8).get() == 38
  352. - Subtasks can now be used with unregistered tasks.
  353. You can specify subtasks even if you just have the name::
  354. >>> s = subtask(task_name, args=(), kwargs=())
  355. >>> s.delay()
  356. - The :program:`celery shell` command now always adds the current
  357. directory to the module path.
  358. - The worker will now properly handle the :exc:`pytz.AmbiguousTimeError`
  359. exception raised when an ETA/countdown is prepared while being in DST
  360. transition (Issue #1061).
  361. - force_execv: Now makes sure that task symbols in the original
  362. task modules will always use the correct app instance (Issue #1072).
  363. - AMQP Backend: Now republishes result messages that have been polled
  364. (using ``result.ready()`` and friends, ``result.get()`` will not do this
  365. in this version).
  366. - Crontab schedule values can now "wrap around"
  367. This means that values like ``11-1`` translates to ``[11, 12, 1]``.
  368. Contributed by Loren Abrams.
  369. - multi stopwait command now shows the pid of processes.
  370. Contributed by Loren Abrams.
  371. - Handling of ETA/countdown fixed when the :setting:`CELERY_ENABLE_UTC`
  372. setting is disabled (Issue #1065).
  373. - A number of uneeded properties were included in messages,
  374. caused by accidentally passing ``Queue.as_dict`` as message properties.
  375. - Rate limit values can now be float
  376. This also extends the string format so that values like ``"0.5/s"`` works.
  377. Contributed by Christoph Krybus
  378. - Fixed a typo in the broadcast routing documentation (Issue #1026).
  379. - Rewrote confusing section about idempotence in the task user guide.
  380. - Fixed typo in the daemonization tutorial (Issue #1055).
  381. - Fixed several typos in the documentation.
  382. Contributed by Marius Gedminas.
  383. - Batches: Now works when using the eventlet pool.
  384. Fix contributed by Thomas Grainger.
  385. - Batches: Added example sending results to :mod:`celery.contrib.batches`.
  386. Contributed by Thomas Grainger.
  387. - Mongodb backend: Connection ``max_pool_size`` can now be set in
  388. :setting:`CELERY_MONGODB_BACKEND_SETTINGS`.
  389. Contributed by Craig Younkins.
  390. - Fixed problem when using earlier versions of :mod:`pytz`.
  391. Fix contributed by Vlad.
  392. - Docs updated to include the default value for the
  393. :setting:`CELERY_TASK_RESULT_EXPIRES` setting.
  394. - Improvements to the django-celery tutorial.
  395. Contributed by Locker537.
  396. - The ``add_consumer`` control command did not properly persist
  397. the addition of new queues so that they survived connection failure
  398. (Issue #1079).
  399. 3.0.12
  400. ======
  401. :release-date: 2012-11-06 02:00 P.M UTC
  402. - Now depends on kombu 2.4.8
  403. - [Redis] New and improved fair queue cycle algorithm (Kevin McCarthy).
  404. - [Redis] Now uses a Redis-based mutex when restoring messages.
  405. - [Redis] Number of messages that can be restored in one interval is no
  406. longer limited (but can be set using the
  407. ``unacked_restore_limit``
  408. :setting:`transport option <BROKER_TRANSPORT_OPTIONS>`.)
  409. - Heartbeat value can be specified in broker URLs (Mher Movsisyan).
  410. - Fixed problem with msgpack on Python 3 (Jasper Bryant-Greene).
  411. - Now depends on billiard 2.7.3.18
  412. - Celery can now be used with static analysis tools like PyDev/PyCharm/pylint
  413. etc.
  414. - Development documentation has moved to Read The Docs.
  415. The new URL is: http://docs.celeryproject.org/en/master
  416. - New :setting:`CELERY_QUEUE_HA_POLICY` setting used to set the default
  417. HA policy for queues when using RabbitMQ.
  418. - New method ``Task.subtask_from_request`` returns a subtask using the current
  419. request.
  420. - Results get_many method did not respect timeout argument.
  421. Fix contributed by Remigiusz Modrzejewski
  422. - generic_init.d scripts now support setting :envvar:`CELERY_CREATE_DIRS` to
  423. always create log and pid directories (Issue #1045).
  424. This can be set in your :file:`/etc/default/celeryd`.
  425. - Fixed strange kombu import problem on Python 3.2 (Issue #1034).
  426. - Worker: ETA scheduler now uses millisecond precision (Issue #1040).
  427. - The ``--config`` argument to programs is now supported by all loaders.
  428. - The :setting:`CASSANDRA_OPTIONS` setting has now been documented.
  429. Contributed by Jared Biel.
  430. - Task methods (:mod:`celery.contrib.methods`) cannot be used with the old
  431. task base class, the task decorator in that module now inherits from the new.
  432. - An optimization was too eager and caused some logging messages to never emit.
  433. - :mod:`celery.contrib.batches` now works again.
  434. - Fixed missing whitespace in ``bdist_rpm`` requirements (Issue #1046).
  435. - Event state's ``tasks_by_name`` applied limit before filtering by name.
  436. Fix contributed by Alexander A. Sosnovskiy.
  437. .. _version-3.0.11:
  438. 3.0.11
  439. ======
  440. :release-date: 2012-09-26 04:00 P.M UTC
  441. - [security:low] generic-init.d scripts changed permissions of /var/log & /var/run
  442. In the daemonization tutorial the recommended directories were as follows:
  443. .. code-block:: bash
  444. CELERYD_LOG_FILE="/var/log/celery/%n.log"
  445. CELERYD_PID_FILE="/var/run/celery/%n.pid"
  446. But in the scripts themselves the default files were ``/var/log/celery%n.log``
  447. and ``/var/run/celery%n.pid``, so if the user did not change the location
  448. by configuration, the directories ``/var/log`` and ``/var/run`` would be
  449. created - and worse have their permissions and owners changed.
  450. This change means that:
  451. - Default pid file is ``/var/run/celery/%n.pid``
  452. - Default log file is ``/var/log/celery/%n.log``
  453. - The directories are only created and have their permissions
  454. changed if *no custom locations are set*.
  455. Users can force paths to be created by calling the ``create-paths``
  456. subcommand:
  457. .. code-block:: bash
  458. $ sudo /etc/init.d/celeryd create-paths
  459. .. admonition:: Upgrading Celery will not update init scripts
  460. To update the init scripts you have to re-download
  461. the files from source control and update them manually.
  462. You can find the init scripts for version 3.0.x at:
  463. http://github.com/celery/celery/tree/3.0/extra/generic-init.d
  464. - Now depends on billiard 2.7.3.17
  465. - Fixes request stack protection when app is initialized more than
  466. once (Issue #1003).
  467. - ETA tasks now properly works when system timezone is not the same
  468. as the configured timezone (Issue #1004).
  469. - Terminating a task now works if the task has been sent to the
  470. pool but not yet acknowledged by a pool process (Issue #1007).
  471. Fix contributed by Alexey Zatelepin
  472. - Terminating a task now properly updates the state of the task to revoked,
  473. and sends a ``task-revoked`` event.
  474. - Generic worker init script now waits for workers to shutdown by default.
  475. - Multi: No longer parses --app option (Issue #1008).
  476. - Multi: stop_verify command renamed to stopwait.
  477. - Daemonization: Now delays trying to create pidfile/logfile until after
  478. the working directory has been changed into.
  479. - :program:`celery worker` and :program:`celery beat` commands now respects
  480. the :option:`--no-color` option (Issue #999).
  481. - Fixed typos in eventlet examples (Issue #1000)
  482. Fix contributed by Bryan Bishop.
  483. Congratulations on opening bug #1000!
  484. - Tasks that raise :exc:`~celery.exceptions.Ignore` are now acknowledged.
  485. - Beat: Now shows the name of the entry in ``sending due task`` logs.
  486. .. _version-3.0.10:
  487. 3.0.10
  488. ======
  489. :release-date: 2012-09-20 05:30 P.M BST
  490. - Now depends on kombu 2.4.7
  491. - Now depends on billiard 2.7.3.14
  492. - Fixes crash at startup when using Django and pre-1.4 projects
  493. (setup_environ).
  494. - Hard time limits now sends the KILL signal shortly after TERM,
  495. to terminate processes that have signal handlers blocked by C extensions.
  496. - Billiard now installs even if the C extension cannot be built.
  497. It's still recommended to build the C extension if you are using
  498. a transport other than rabbitmq/redis (or use forced execv for some
  499. other reason).
  500. - Pool now sets a ``current_process().index`` attribute that can be used to create
  501. as many log files as there are processes in the pool.
  502. - Canvas: chord/group/chain no longer modifies the state when called
  503. Previously calling a chord/group/chain would modify the ids of subtasks
  504. so that:
  505. .. code-block:: python
  506. >>> c = chord([add.s(2, 2), add.s(4, 4)], xsum.s())
  507. >>> c()
  508. >>> c() <-- call again
  509. at the second time the ids for the tasks would be the same as in the
  510. previous invocation. This is now fixed, so that calling a subtask
  511. won't mutate any options.
  512. - Canvas: Chaining a chord to another task now works (Issue #965).
  513. - Worker: Fixed a bug where the request stack could be corrupted if
  514. relative imports are used.
  515. Problem usually manifested itself as an exception while trying to
  516. send a failed task result (``NoneType does not have id attribute``).
  517. Fix contributed by Sam Cooke.
  518. - Tasks can now raise :exc:`~celery.exceptions.Ignore` to skip updating states
  519. or events after return.
  520. Example:
  521. .. code-block:: python
  522. from celery.exceptions import Ignore
  523. @task
  524. def custom_revokes():
  525. if redis.sismember('tasks.revoked', custom_revokes.request.id):
  526. raise Ignore()
  527. - The worker now makes sure the request/task stacks are not modified
  528. by the initial ``Task.__call__``.
  529. This would previously be a problem if a custom task class defined
  530. ``__call__`` and also called ``super()``.
  531. - Because of problems the fast local optimization has been disabled,
  532. and can only be enabled by setting the :envvar:`USE_FAST_LOCALS` attribute.
  533. - Worker: Now sets a default socket timeout of 5 seconds at shutdown
  534. so that broken socket reads do not hinder proper shutdown (Issue #975).
  535. - More fixes related to late eventlet/gevent patching.
  536. - Documentation for settings out of sync with reality:
  537. - :setting:`CELERY_TASK_PUBLISH_RETRY`
  538. Documented as disabled by default, but it was enabled by default
  539. since 2.5 as stated by the 2.5 changelog.
  540. - :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`
  541. The default max_retries had been set to 100, but documented as being
  542. 3, and the interval_max was set to 1 but documented as 0.2.
  543. The default setting are now set to 3 and 0.2 as it was originally
  544. documented.
  545. Fix contributed by Matt Long.
  546. - Worker: Log messages when connection established and lost have been improved.
  547. - The repr of a crontab schedule value of '0' should be '*' (Issue #972).
  548. - Revoked tasks are now removed from reserved/active state in the worker
  549. (Issue #969)
  550. Fix contributed by Alexey Zatelepin.
  551. - gevent: Now supports hard time limits using ``gevent.Timeout``.
  552. - Documentation: Links to init scripts now point to the 3.0 branch instead
  553. of the development branch (master).
  554. - Documentation: Fixed typo in signals user guide (Issue #986).
  555. ``instance.app.queues`` -> ``instance.app.amqp.queues``.
  556. - Eventlet/gevent: The worker did not properly set the custom app
  557. for new greenlets.
  558. - Eventlet/gevent: Fixed a bug where the worker could not recover
  559. from connection loss (Issue #959).
  560. Also, because of a suspected bug in gevent the
  561. :setting:`BROKER_CONNECTION_TIMEOUT` setting has been disabled
  562. when using gevent
  563. 3.0.9
  564. =====
  565. :release-date: 2012-08-31 06:00 P.M BST
  566. - Important note for users of Django and the database scheduler!
  567. Recently a timezone issue has been fixed for periodic tasks,
  568. but erroneous timezones could have already been stored in the
  569. database, so for the fix to work you need to reset
  570. the ``last_run_at`` fields.
  571. You can do this by executing the following command:
  572. .. code-block:: bash
  573. $ python manage.py shell
  574. >>> from djcelery.models import PeriodicTask
  575. >>> PeriodicTask.objects.update(last_run_at=None)
  576. You also have to do this if you change the timezone or
  577. :setting:`CELERY_ENABLE_UTC` setting.
  578. - Note about the :setting:`CELERY_ENABLE_UTC` setting.
  579. If you previously disabled this just to force periodic tasks to work with
  580. your timezone, then you are now *encouraged to re-enable it*.
  581. - Now depends on Kombu 2.4.5 which fixes PyPy + Jython installation.
  582. - Fixed bug with timezones when :setting:`CELERY_ENABLE_UTC` is disabled
  583. (Issue #952).
  584. - Fixed a typo in the celerybeat upgrade mechanism (Issue #951).
  585. - Make sure the `exc_info` argument to logging is resolved (Issue #899).
  586. - Fixed problem with Python 3.2 and thread join timeout overflow (Issue #796).
  587. - A test case was occasionally broken for Python 2.5.
  588. - Unit test suite now passes for PyPy 1.9.
  589. - App instances now supports the with statement.
  590. This calls the new :meth:`~celery.Celery.close` method at exit, which
  591. cleans up after the app like closing pool connections.
  592. Note that this is only necessary when dynamically creating apps,
  593. e.g. for "temporary" apps.
  594. - Support for piping a subtask to a chain.
  595. For example:
  596. .. code-block:: python
  597. pipe = sometask.s() | othertask.s()
  598. new_pipe = mytask.s() | pipe
  599. Contributed by Steve Morin.
  600. - Fixed problem with group results on non-pickle serializers.
  601. Fix contributed by Steeve Morin.
  602. .. _version-3.0.8:
  603. 3.0.8
  604. =====
  605. :release-date: 2012-08-29 05:00 P.M BST
  606. - Now depends on Kombu 2.4.4
  607. - Fixed problem with amqplib and receiving larger message payloads
  608. (Issue #922).
  609. The problem would manifest itself as either the worker hanging,
  610. or occasionally a ``Framing error`` exception appearing.
  611. Users of the new ``pyamqp://`` transport must upgrade to
  612. :mod:`amqp` 0.9.3.
  613. - Beat: Fixed another timezone bug with interval and crontab schedules
  614. (Issue #943).
  615. - Beat: The schedule file is now automatically cleared if the timezone
  616. is changed.
  617. The schedule is also cleared when you upgrade to 3.0.8 from an earlier
  618. version, this to register the initial timezone info.
  619. - Events: The :event:`worker-heartbeat` event now include processed and active
  620. count fields.
  621. Contributed by Mher Movsisyan.
  622. - Fixed error with error email and new task classes (Issue #931).
  623. - ``BaseTask.__call__`` is no longer optimized away if it has been monkey
  624. patched.
  625. - Fixed shutdown issue when using gevent (Issue #911 & Issue #936).
  626. Fix contributed by Thomas Meson.
  627. .. _version-3.0.7:
  628. 3.0.7
  629. =====
  630. :release-date: 2012-08-24 05:00 P.M BST
  631. - Fixes several problems with periodic tasks and timezones (Issue #937).
  632. - Now depends on kombu 2.4.2
  633. - Redis: Fixes a race condition crash
  634. - Fixes an infinite loop that could happen when retrying establishing
  635. the broker connection.
  636. - Daemons now redirect standard file descriptors to :file:`/dev/null`
  637. Though by default the standard outs are also redirected
  638. to the logger instead, but you can disable this by changing
  639. the :setting:`CELERY_REDIRECT_STDOUTS` setting.
  640. - Fixes possible problems when eventlet/gevent is patched too late.
  641. - ``LoggingProxy`` no longer defines ``fileno()`` (Issue #928).
  642. - Results are now ignored for the chord unlock task.
  643. Fix contributed by Steeve Morin.
  644. - Cassandra backend now works if result expiry is disabled.
  645. Fix contributed by Steeve Morin.
  646. - The traceback object is now passed to signal handlers instead
  647. of the string representation.
  648. Fix contributed by Adam DePue.
  649. - Celery command: Extensions are now sorted by name.
  650. - A regression caused the :event:`task-failed` event to be sent
  651. with the exception object instead of its string representation.
  652. - The worker daemon would try to create the pid file before daemonizing
  653. to catch errors, but this file was not immediately released (Issue #923).
  654. - Fixes Jython compatibility.
  655. - ``billiard.forking_enable`` was called by all pools not just the
  656. processes pool, which would result in a useless warning if the billiard
  657. C extensions were not installed.
  658. .. _version-3.0.6:
  659. 3.0.6
  660. =====
  661. :release-date: 2012-08-17 11:00 P.M BST
  662. - Now depends on kombu 2.4.0
  663. - Now depends on billiard 2.7.3.12
  664. - Redis: Celery now tries to restore messages whenever there are no messages
  665. in the queue.
  666. - Crontab schedules now properly respects :setting:`CELERY_TIMEZONE` setting.
  667. It's important to note that crontab schedules uses UTC time by default
  668. unless this setting is set.
  669. Issue #904 and django-celery #150.
  670. - ``billiard.enable_forking`` is now only set by the processes pool.
  671. - The transport is now properly shown by :program:`celery report`
  672. (Issue #913).
  673. - The `--app` argument now works if the last part is a module name
  674. (Issue #921).
  675. - Fixed problem with unpickleable exceptions (billiard #12).
  676. - Adds ``task_name`` attribute to ``EagerResult`` which is always
  677. :const:`None` (Issue #907).
  678. - Old Task class in :mod:`celery.task` no longer accepts magic kwargs by
  679. default (Issue #918).
  680. A regression long ago disabled magic kwargs for these, and since
  681. no one has complained about it we don't have any incentive to fix it now.
  682. - The ``inspect reserved`` control command did not work properly.
  683. - Should now play better with static analyzation tools by explicitly
  684. specifying dynamically created attributes in the :mod:`celery` and
  685. :mod:`celery.task` modules.
  686. - Terminating a task now results in
  687. :exc:`~celery.exceptions.RevokedTaskError` instead of a ``WorkerLostError``.
  688. - ``AsyncResult.revoke`` now accepts ``terminate`` and ``signal`` arguments.
  689. - The :event:`task-revoked` event now includes new fields: ``terminated``,
  690. ``signum``, and ``expired``.
  691. - The argument to :class:`~celery.exceptions.TaskRevokedError` is now one
  692. of the reasons ``revoked``, ``expired`` or ``terminated``.
  693. - Old Task class does no longer use classmethods for push_request and
  694. pop_request (Issue #912).
  695. - ``GroupResult`` now supports the ``children`` attribute (Issue #916).
  696. - ``AsyncResult.collect`` now respects the ``intermediate`` argument
  697. (Issue #917).
  698. - Fixes example task in documentation (Issue #902).
  699. - Eventlet fixed so that the environment is patched as soon as possible.
  700. - eventlet: Now warns if celery related modules that depends on threads
  701. are imported before eventlet is patched.
  702. - Improved event and camera examples in the monitoring guide.
  703. - Disables celery command setuptools entrypoints if the command can't be
  704. loaded.
  705. - Fixed broken ``dump_request`` example in the tasks guide.
  706. .. _version-3.0.5:
  707. 3.0.5
  708. =====
  709. :release-date: 2012-08-01 04:00 P.M BST
  710. - Now depends on kombu 2.3.1 + billiard 2.7.3.11
  711. - Fixed a bug with the -B option (``cannot pickle thread.lock objects``)
  712. (Issue #894 + Issue #892, + django-celery #154).
  713. - The :control:`restart_pool` control command now requires the
  714. :setting:`CELERYD_POOL_RESTARTS` setting to be enabled
  715. This change was necessary as the multiprocessing event that the restart
  716. command depends on is responsible for creating many semaphores/file
  717. descriptors, resulting in problems in some environments.
  718. - ``chain.apply`` now passes args to the first task (Issue #889).
  719. - Documented previously secret options to the Django-Celery monitor
  720. in the monitoring userguide (Issue #396).
  721. - Old changelog are now organized in separate documents for each series,
  722. see :ref:`history`.
  723. .. _version-3.0.4:
  724. 3.0.4
  725. =====
  726. :release-date: 2012-07-26 07:00 P.M BST
  727. - Now depends on Kombu 2.3
  728. - New experimental standalone Celery monitor: Flower
  729. See :ref:`monitoring-flower` to read more about it!
  730. Contributed by Mher Movsisyan.
  731. - Now supports AMQP heartbeats if using the new ``pyamqp://`` transport.
  732. - The py-amqp transport requires the :mod:`amqp` library to be installed::
  733. $ pip install amqp
  734. - Then you need to set the transport URL prefix to ``pyamqp://``.
  735. - The default heartbeat value is 10 seconds, but this can be changed using
  736. the :setting:`BROKER_HEARTBEAT` setting::
  737. BROKER_HEARTBEAT = 5.0
  738. - If the broker heartbeat is set to 10 seconds, the heartbeats will be
  739. monitored every 5 seconds (double the hertbeat rate).
  740. See the `Kombu 2.3 changelog`_ for more information.
  741. .. _`Kombu 2.3 changelog`:
  742. http://kombu.readthedocs.org/en/latest/changelog.html#version-2-3-0
  743. - Now supports RabbitMQ Consumer Cancel Notifications, using the ``pyamqp://``
  744. transport.
  745. This is essential when running RabbitMQ in a cluster.
  746. See the `Kombu 2.3 changelog`_ for more information.
  747. - Delivery info is no longer passed directly through.
  748. It was discovered that the SQS transport adds objects that can't
  749. be pickled to the delivery info mapping, so we had to go back
  750. to using the whitelist again.
  751. Fixing this bug also means that the SQS transport is now working again.
  752. - The semaphore was not properly released when a task was revoked (Issue #877).
  753. This could lead to tasks being swallowed and not released until a worker
  754. restart.
  755. Thanks to Hynek Schlawack for debugging the issue.
  756. - Retrying a task now also forwards any linked tasks.
  757. This means that if a task is part of a chain (or linked in some other
  758. way) and that even if the task is retried, then the next task in the chain
  759. will be executed when the retry succeeds.
  760. - Chords: Now supports setting the interval and other keyword arguments
  761. to the chord unlock task.
  762. - The interval can now be set as part of the chord subtasks kwargs::
  763. chord(header)(body, interval=10.0)
  764. - In addition the chord unlock task now honors the Task.default_retry_delay
  765. option, used when none is specified, which also means that the default
  766. interval can also be changed using annotations:
  767. .. code-block:: python
  768. CELERY_ANNOTATIONS = {
  769. 'celery.chord_unlock': {
  770. 'default_retry_delay': 10.0,
  771. }
  772. }
  773. - New :meth:`@Celery.add_defaults` method can add new default configuration
  774. dicts to the applications configuration.
  775. For example::
  776. config = {'FOO': 10}
  777. celery.add_defaults(config)
  778. is the same as ``celery.conf.update(config)`` except that data will not be
  779. copied, and that it will not be pickled when the worker spawns child
  780. processes.
  781. In addition the method accepts a callable::
  782. def initialize_config():
  783. # insert heavy stuff that can't be done at import time here.
  784. celery.add_defaults(initialize_config)
  785. which means the same as the above except that it will not happen
  786. until the celery configuration is actually used.
  787. As an example, Celery can lazily use the configuration of a Flask app::
  788. flask_app = Flask()
  789. celery = Celery()
  790. celery.add_defaults(lambda: flask_app.config)
  791. - Revoked tasks were not marked as revoked in the result backend (Issue #871).
  792. Fix contributed by Hynek Schlawack.
  793. - Eventloop now properly handles the case when the epoll poller object
  794. has been closed (Issue #882).
  795. - Fixed syntax error in ``funtests/test_leak.py``
  796. Fix contributed by Catalin Iacob.
  797. - group/chunks: Now accepts empty task list (Issue #873).
  798. - New method names:
  799. - ``Celery.default_connection()`` ➠ :meth:`~@Celery.connection_or_acquire`.
  800. - ``Celery.default_producer()`` ➠ :meth:`~@Celery.producer_or_acquire`.
  801. The old names still work for backward compatibility.
  802. .. _version-3.0.3:
  803. 3.0.3
  804. =====
  805. :release-date: 2012-07-20 09:17 P.M BST
  806. :by: Ask Solem
  807. - amqplib passes the channel object as part of the delivery_info
  808. and it's not pickleable, so we now remove it.
  809. .. _version-3.0.2:
  810. 3.0.2
  811. =====
  812. :release-date: 2012-07-20 04:00 P.M BST
  813. :by: Ask Solem
  814. - A bug caused the following task options to not take defaults from the
  815. configuration (Issue #867 + Issue #858)
  816. The following settings were affected:
  817. - :setting:`CELERY_IGNORE_RESULT`
  818. - :setting:`CELERYD_SEND_TASK_ERROR_EMAILS`
  819. - :setting:`CELERY_TRACK_STARTED`
  820. - :setting:`CElERY_STORE_ERRORS_EVEN_IF_IGNORED`
  821. Fix contributed by John Watson.
  822. - Task Request: ``delivery_info`` is now passed through as-is (Issue #807).
  823. - The eta argument now supports datetime's with a timezone set (Issue #855).
  824. - The worker's banner displayed the autoscale settings in the wrong order
  825. (Issue #859).
  826. - Extension commands are now loaded after concurrency is set up
  827. so that they don't interfere with e.g. eventlet patching.
  828. - Fixed bug in the threaded pool (Issue #863)
  829. - The task failure handler mixed up the fields in :func:`sys.exc_info`.
  830. Fix contributed by Rinat Shigapov.
  831. - Fixed typos and wording in the docs.
  832. Fix contributed by Paul McMillan
  833. - New setting: :setting:`CELERY_WORKER_DIRECT`
  834. If enabled each worker will consume from their own dedicated queue
  835. which can be used to route tasks to specific workers.
  836. - Fixed several edge case bugs in the add consumer remote control command.
  837. - :mod:`~celery.contrib.migrate`: Can now filter and move tasks to specific
  838. workers if :setting:`CELERY_WORKER_DIRECT` is enabled.
  839. Among other improvements, the following functions have been added:
  840. * ``move_direct(filterfun, **opts)``
  841. * ``move_direct_by_id(task_id, worker_hostname, **opts)``
  842. * ``move_direct_by_idmap({task_id: worker_hostname, ...}, **opts)``
  843. * ``move_direct_by_taskmap({task_name: worker_hostname, ...}, **opts)``
  844. - :meth:`~celery.Celery.default_connection` now accepts a pool argument that
  845. if set to false causes a new connection to be created instead of acquiring
  846. one from the pool.
  847. - New signal: :signal:`celeryd_after_setup`.
  848. - Default loader now keeps lowercase attributes from the configuration module.
  849. .. _version-3.0.1:
  850. 3.0.1
  851. =====
  852. :release-date: 2012-07-10 06:00 P.M BST
  853. :by: Ask Solem
  854. - Now depends on kombu 2.2.5
  855. - inspect now supports limit argument::
  856. myapp.control.inspect(limit=1).ping()
  857. - Beat: now works with timezone aware datetime's.
  858. - Task classes inheriting ``from celery import Task``
  859. mistakingly enabled ``accept_magic_kwargs``.
  860. - Fixed bug in ``inspect scheduled`` (Issue #829).
  861. - Beat: Now resets the schedule to upgrade to UTC.
  862. - The :program:`celery worker` command now works with eventlet/gevent.
  863. Previously it would not patch the environment early enough.
  864. - The :program:`celery` command now supports extension commands
  865. using setuptools entry-points.
  866. Libraries can add additional commands to the :program:`celery`
  867. command by adding an entry-point like::
  868. setup(
  869. entry_points=[
  870. 'celery.commands': [
  871. 'foo = my.module:Command',
  872. ],
  873. ],
  874. ...)
  875. The command must then support the interface of
  876. :class:`celery.bin.base.Command`.
  877. - contrib.migrate: New utilities to move tasks from one queue to another.
  878. - :func:`~celery.contrib.migrate.move_tasks`
  879. - :func:`~celery.contrib.migrate.move_task_by_id`
  880. - The :event:`task-sent` event now contains ``exchange`` and ``routing_key``
  881. fields.
  882. - Fixes bug with installing on Python 3.
  883. Fix contributed by Jed Smith.
  884. .. _version-3.0.0:
  885. 3.0.0 (Chiastic Slide)
  886. ======================
  887. :release-date: 2012-07-07 01:30 P.M BST
  888. :by: Ask Solem
  889. See :ref:`whatsnew-3.0`.
  890. >>>>>>> 3.0
  891. .. _version-3.0.17:
  892. 3.0.17
  893. ======
  894. :release-date: 2013-03-22 04:00:00 P.M UTC
  895. - Now depends on kombu 2.5.8
  896. - Now depends on billiard 2.7.3.23
  897. - RabbitMQ/Redis: thread-less and lock-free rate-limit implementation.
  898. This means that rate limits pose minimal overhead when used with
  899. RabbitMQ/Redis or future transports using the eventloop,
  900. and that the rate-limit implementation is now thread-less and lock-free.
  901. The thread-based transports will still use the old implementation for
  902. now, but the plan is to use the timer also for other
  903. broker transports in Celery 3.1.
  904. - Rate limits now works with eventlet/gevent if using RabbitMQ/Redis as the
  905. broker.
  906. - A regression caused ``task.retry`` to ignore additional keyword arguments.
  907. Extra keyword arguments are now used as execution options again.
  908. Fix contributed by Simon Engledew.
  909. - Windows: Fixed problem with the worker trying to pickle the Django settings
  910. module at worker startup.
  911. - generic-init.d: No longer double quotes ``$CELERYD_CHDIR`` (Issue #1235).
  912. - generic-init.d: Removes bash-specific syntax.
  913. Fix contributed by Pär Wieslander.
  914. - Cassandra Result Backend: Now handles the
  915. :exc:`~pycassa.AllServersUnavailable` error (Issue #1010).
  916. Fix contributed by Jared Biel.
  917. - Result: Now properly forwards apps to GroupResults when deserializing
  918. (Issue #1249).
  919. Fix contributed by Charles-Axel Dein.
  920. - ``GroupResult.revoke`` now supports the ``terminate`` and ``signal``
  921. keyword arguments.
  922. - Worker: Multiprocessing pool workers now import task modules/configuration
  923. before setting up the logging system so that logging signals can be
  924. connected before they're dispatched.
  925. - chord: The ``AsyncResult`` instance returned now has its ``parent``
  926. attribute set to the header ``GroupResult``.
  927. This is consistent with how ``chain`` works.
  928. .. _version-3.0.16:
  929. 3.0.16
  930. ======
  931. :release-date: 2013-03-07 04:00:00 P.M UTC
  932. - Happy International Women's Day!
  933. We have a long way to go, so this is a chance for you to get involved in one
  934. of the organizations working for making our communities more
  935. diverse.
  936. - PyLadies — http://pyladies.com
  937. - Girls Who Code — http://www.girlswhocode.com
  938. - Women Who Code — http://www.meetup.com/Women-Who-Code-SF/
  939. - Now depends on :mod:`kombu` version 2.5.7
  940. - Now depends on :mod:`billiard` version 2.7.3.22
  941. - AMQP heartbeats are now disabled by default.
  942. Some users experiences issues with heartbeats enabled,
  943. and it's not strictly necessary to use them.
  944. If you're experiencing problems detecting connection failures,
  945. you can re-enable heartbeats by configuring the :setting:`BROKER_HEARTBEAT`
  946. setting.
  947. - Worker: Now propagates connection errors occurring in multiprocessing
  948. callbacks, so that the connection can be reset (Issue #1226).
  949. - Worker: Now propagates connection errors occurring in timer callbacks,
  950. so that the connection can be reset.
  951. - The modules in :setting:`CELERY_IMPORTS` and :setting:`CELERY_INCLUDE`
  952. are now imported in the original order (Issue #1161).
  953. The modules in :setting:`CELERY_IMPORTS` will be imported first,
  954. then continued by :setting:`CELERY_INCLUDE`.
  955. Thanks to Joey Wilhelm.
  956. - New bash completion for ``celery`` available in the git repository:
  957. https://github.com/celery/celery/tree/3.0/extra/bash-completion
  958. You can source this file or put it in ``bash_completion.d`` to
  959. get auto-completion for the ``celery`` command-line utility.
  960. - The node name of a worker can now include unicode characters (Issue #1186).
  961. - The repr of a ``crontab`` object now displays correctly (Issue #972).
  962. - ``events.State`` no longer modifies the original event dictionary.
  963. - No longer uses ``Logger.warn`` deprecated in Python 3.
  964. - Cache Backend: Now works with chords again (Issue #1094).
  965. - Chord unlock now handles errors occurring while calling the callback.
  966. - Generic worker init.d script: Status check is now performed by
  967. querying the pid of the instance instead of sending messages.
  968. Contributed by Milen Pavlov.
  969. - Improved init scripts for CentOS.
  970. - Updated to support celery 3.x conventions.
  971. - Now uses CentOS built-in ``status`` and ``killproc``
  972. - Support for multi-node / multi-pid worker services.
  973. - Standard color-coded CentOS service-init output.
  974. - A test suite.
  975. Contributed by Milen Pavlov.
  976. - ``ResultSet.join`` now always works with empty result set (Issue #1219).
  977. - A ``group`` consisting of a single task is now supported (Issue #1219).
  978. - Now supports the ``pycallgraph`` program (Issue #1051).
  979. - Fixed Jython compatibility problems.
  980. - Django tutorial: Now mentions that the example app must be added to
  981. ``INSTALLED_APPS`` (Issue #1192).
  982. .. _version-3.0.15:
  983. 3.0.15
  984. ======
  985. :release-date: 2013-02-11 04:30:00 P.M UTC
  986. - Now depends on billiard 2.7.3.21 which fixed a syntax error crash.
  987. - Fixed bug with :setting:`CELERY_SEND_TASK_SENT_EVENT`.
  988. .. _version-3.0.14:
  989. 3.0.14
  990. ======
  991. :release-date: 2013-02-08 05:00:00 P.M UTC
  992. - Now depends on Kombu 2.5.6
  993. - Now depends on billiard 2.7.3.20
  994. - ``execv`` is now disabled by default.
  995. It was causing too many problems for users, you can still enable
  996. it using the :setting:`CELERYD_FORCE_EXECV` setting.
  997. execv was only enabled when transports other than amqp/redis was used,
  998. and it's there to prevent deadlocks caused by mutexes not being released
  999. before the process forks. Sadly it also changes the environment
  1000. introducing many corner case bugs that is hard to fix without adding
  1001. horrible hacks. Deadlock issues are reported far less often than the
  1002. bugs that execv are causing, so we now disable it by default.
  1003. Work is in motion to create non-blocking versions of these transports
  1004. so that execv is not necessary (which is the situation with the amqp
  1005. and redis broker transports)
  1006. - Chord exception behavior defined (Issue #1172).
  1007. From Celery 3.1 the chord callback will change state to FAILURE
  1008. when a task part of a chord raises an exception.
  1009. It was never documented what happens in this case,
  1010. and the actual behavior was very unsatisfactory, indeed
  1011. it will just forward the exception value to the chord callback.
  1012. For backward compatibility reasons we do not change to the new
  1013. behavior in a bugfix release, even if the current behavior was
  1014. never documented. Instead you can enable the
  1015. :setting:`CELERY_CHORD_PROPAGATES` setting to get the new behavior
  1016. that will be default from Celery 3.1.
  1017. See more at :ref:`chord-errors`.
  1018. - worker: Fixes bug with ignored and retried tasks.
  1019. The ``on_chord_part_return`` and ``Task.after_return`` callbacks,
  1020. nor the ``task_postrun`` signal should be called when the task was
  1021. retried/ignored.
  1022. Fix contributed by Vlad.
  1023. - ``GroupResult.join_native`` now respects the ``propagate`` argument.
  1024. - ``subtask.id`` added as an alias to ``subtask['options'].id``
  1025. .. code-block:: python
  1026. >>> s = add.s(2, 2)
  1027. >>> s.id = 'my-id'
  1028. >>> s['options']
  1029. {'task_id': 'my-id'}
  1030. >>> s.id
  1031. 'my-id'
  1032. - worker: Fixed error `Could not start worker processes` occurring
  1033. when restarting after connection failure (Issue #1118).
  1034. - Adds new signal :signal:`task-retried` (Issue #1169).
  1035. - `celery events --dumper` now handles connection loss.
  1036. - Will now retry sending the task-sent event in case of connection failure.
  1037. - amqp backend: Now uses ``Message.requeue`` instead of republishing
  1038. the message after poll.
  1039. - New :setting:`BROKER_HEARTBEAT_CHECKRATE` setting introduced to modify the
  1040. rate at which broker connection heartbeats are monitored.
  1041. The default value was also changed from 3.0 to 2.0.
  1042. - :class:`celery.events.state.State` is now pickleable.
  1043. Fix contributed by Mher Movsisyan.
  1044. - :class:`celery.datastructures.LRUCache` is now pickleable.
  1045. Fix contributed by Mher Movsisyan.
  1046. - The stats broadcast command now includes the workers pid.
  1047. Contributed by Mher Movsisyan.
  1048. - New ``conf`` remote control command to get a workers current configuration.
  1049. Contributed by Mher Movsisyan.
  1050. - Adds the ability to modify the chord unlock task's countdown
  1051. argument (Issue #1146).
  1052. Contributed by Jun Sakai
  1053. - beat: The scheduler now uses the `now()`` method of the schedule,
  1054. so that schedules can provide a custom way to get the current date and time.
  1055. Contributed by Raphaël Slinckx
  1056. - Fixed pickling of configuration modules on Windows or when execv is used
  1057. (Issue #1126).
  1058. - Multiprocessing logger is now configured with loglevel ``ERROR``
  1059. by default.
  1060. Since 3.0 the multiprocessing loggers were disabled by default
  1061. (only configured when the :envvar:`MP_LOG` environment variable was set).
  1062. .. _version-3.0.13:
  1063. 3.0.13
  1064. ======
  1065. :release-date: 2013-01-07 04:00:00 P.M UTC
  1066. - Now depends on Kombu 2.5
  1067. - py-amqp has replaced amqplib as the default transport,
  1068. gaining support for AMQP 0.9, and the RabbitMQ extensions
  1069. including Consumer Cancel Notifications and heartbeats.
  1070. - support for multiple connection URLs for failover.
  1071. - Read more in the `Kombu 2.5 changelog`_.
  1072. .. _`Kombu 2.5 changelog`:
  1073. http://kombu.readthedocs.org/en/latest/changelog.html#version-2-5-0
  1074. - Now depends on billiard 2.7.3.19
  1075. - Fixed a deadlock issue that could occur when the producer pool
  1076. inherited the connection pool instance of the parent process.
  1077. - The :option:`--loader` option now works again (Issue #1066).
  1078. - :program:`celery` umbrella command: All subcommands now supports
  1079. the :option:`--workdir` option (Issue #1063).
  1080. - Groups included in chains now give GroupResults (Issue #1057)
  1081. Previously it would incorrectly add a regular result instead of a group
  1082. result, but now this works:
  1083. .. code-block:: python
  1084. # [4 + 4, 4 + 8, 16 + 8]
  1085. >>> res = (add.s(2, 2) | group(add.s(4), add.s(8), add.s(16)))()
  1086. >>> res
  1087. <GroupResult: a0acf905-c704-499e-b03a-8d445e6398f7 [
  1088. 4346501c-cb99-4ad8-8577-12256c7a22b1,
  1089. b12ead10-a622-4d44-86e9-3193a778f345,
  1090. 26c7a420-11f3-4b33-8fac-66cd3b62abfd]>
  1091. - Chains can now chain other chains and use partial arguments (Issue #1057).
  1092. Example:
  1093. .. code-block:: python
  1094. >>> c1 = (add.s(2) | add.s(4))
  1095. >>> c2 = (add.s(8) | add.s(16))
  1096. >>> c3 = (c1 | c2)
  1097. # 8 + 2 + 4 + 8 + 16
  1098. >>> assert c3(8).get() == 38
  1099. - Subtasks can now be used with unregistered tasks.
  1100. You can specify subtasks even if you just have the name::
  1101. >>> s = subtask(task_name, args=(), kwargs=())
  1102. >>> s.delay()
  1103. - The :program:`celery shell` command now always adds the current
  1104. directory to the module path.
  1105. - The worker will now properly handle the :exc:`pytz.AmbiguousTimeError`
  1106. exception raised when an ETA/countdown is prepared while being in DST
  1107. transition (Issue #1061).
  1108. - force_execv: Now makes sure that task symbols in the original
  1109. task modules will always use the correct app instance (Issue #1072).
  1110. - AMQP Backend: Now republishes result messages that have been polled
  1111. (using ``result.ready()`` and friends, ``result.get()`` will not do this
  1112. in this version).
  1113. - Crontab schedule values can now "wrap around"
  1114. This means that values like ``11-1`` translates to ``[11, 12, 1]``.
  1115. Contributed by Loren Abrams.
  1116. - multi stopwait command now shows the pid of processes.
  1117. Contributed by Loren Abrams.
  1118. - Handling of ETA/countdown fixed when the :setting:`CELERY_ENABLE_UTC`
  1119. setting is disabled (Issue #1065).
  1120. - A number of uneeded properties were included in messages,
  1121. caused by accidentally passing ``Queue.as_dict`` as message properties.
  1122. - Rate limit values can now be float
  1123. This also extends the string format so that values like ``"0.5/s"`` works.
  1124. Contributed by Christoph Krybus
  1125. - Fixed a typo in the broadcast routing documentation (Issue #1026).
  1126. - Rewrote confusing section about idempotence in the task user guide.
  1127. - Fixed typo in the daemonization tutorial (Issue #1055).
  1128. - Fixed several typos in the documentation.
  1129. Contributed by Marius Gedminas.
  1130. - Batches: Now works when using the eventlet pool.
  1131. Fix contributed by Thomas Grainger.
  1132. - Batches: Added example sending results to :mod:`celery.contrib.batches`.
  1133. Contributed by Thomas Grainger.
  1134. - Mongodb backend: Connection ``max_pool_size`` can now be set in
  1135. :setting:`CELERY_MONGODB_BACKEND_SETTINGS`.
  1136. Contributed by Craig Younkins.
  1137. - Fixed problem when using earlier versions of :mod:`pytz`.
  1138. Fix contributed by Vlad.
  1139. - Docs updated to include the default value for the
  1140. :setting:`CELERY_TASK_RESULT_EXPIRES` setting.
  1141. - Improvements to the django-celery tutorial.
  1142. Contributed by Locker537.
  1143. - The ``add_consumer`` control command did not properly persist
  1144. the addition of new queues so that they survived connection failure
  1145. (Issue #1079).
  1146. 3.0.12
  1147. ======
  1148. :release-date: 2012-11-06 02:00 P.M UTC
  1149. - Now depends on kombu 2.4.8
  1150. - [Redis] New and improved fair queue cycle algorithm (Kevin McCarthy).
  1151. - [Redis] Now uses a Redis-based mutex when restoring messages.
  1152. - [Redis] Number of messages that can be restored in one interval is no
  1153. longer limited (but can be set using the
  1154. ``unacked_restore_limit``
  1155. :setting:`transport option <BROKER_TRANSPORT_OPTIONS>`.)
  1156. - Heartbeat value can be specified in broker URLs (Mher Movsisyan).
  1157. - Fixed problem with msgpack on Python 3 (Jasper Bryant-Greene).
  1158. - Now depends on billiard 2.7.3.18
  1159. - Celery can now be used with static analysis tools like PyDev/PyCharm/pylint
  1160. etc.
  1161. - Development documentation has moved to Read The Docs.
  1162. The new URL is: http://docs.celeryproject.org/en/master
  1163. - New :setting:`CELERY_QUEUE_HA_POLICY` setting used to set the default
  1164. HA policy for queues when using RabbitMQ.
  1165. - New method ``Task.subtask_from_request`` returns a subtask using the current
  1166. request.
  1167. - Results get_many method did not respect timeout argument.
  1168. Fix contributed by Remigiusz Modrzejewski
  1169. - generic_init.d scripts now support setting :envvar:`CELERY_CREATE_DIRS` to
  1170. always create log and pid directories (Issue #1045).
  1171. This can be set in your :file:`/etc/default/celeryd`.
  1172. - Fixed strange kombu import problem on Python 3.2 (Issue #1034).
  1173. - Worker: ETA scheduler now uses millisecond precision (Issue #1040).
  1174. - The ``--config`` argument to programs is now supported by all loaders.
  1175. - The :setting:`CASSANDRA_OPTIONS` setting has now been documented.
  1176. Contributed by Jared Biel.
  1177. - Task methods (:mod:`celery.contrib.methods`) cannot be used with the old
  1178. task base class, the task decorator in that module now inherits from the new.
  1179. - An optimization was too eager and caused some logging messages to never emit.
  1180. - :mod:`celery.contrib.batches` now works again.
  1181. - Fixed missing whitespace in ``bdist_rpm`` requirements (Issue #1046).
  1182. - Event state's ``tasks_by_name`` applied limit before filtering by name.
  1183. Fix contributed by Alexander A. Sosnovskiy.
  1184. .. _version-3.0.11:
  1185. 3.0.11
  1186. ======
  1187. :release-date: 2012-09-26 04:00 P.M UTC
  1188. - [security:low] generic-init.d scripts changed permissions of /var/log & /var/run
  1189. In the daemonization tutorial the recommended directories were as follows:
  1190. .. code-block:: bash
  1191. CELERYD_LOG_FILE="/var/log/celery/%n.log"
  1192. CELERYD_PID_FILE="/var/run/celery/%n.pid"
  1193. But in the scripts themselves the default files were ``/var/log/celery%n.log``
  1194. and ``/var/run/celery%n.pid``, so if the user did not change the location
  1195. by configuration, the directories ``/var/log`` and ``/var/run`` would be
  1196. created - and worse have their permissions and owners changed.
  1197. This change means that:
  1198. - Default pid file is ``/var/run/celery/%n.pid``
  1199. - Default log file is ``/var/log/celery/%n.log``
  1200. - The directories are only created and have their permissions
  1201. changed if *no custom locations are set*.
  1202. Users can force paths to be created by calling the ``create-paths``
  1203. subcommand:
  1204. .. code-block:: bash
  1205. $ sudo /etc/init.d/celeryd create-paths
  1206. .. admonition:: Upgrading Celery will not update init scripts
  1207. To update the init scripts you have to re-download
  1208. the files from source control and update them manually.
  1209. You can find the init scripts for version 3.0.x at:
  1210. http://github.com/celery/celery/tree/3.0/extra/generic-init.d
  1211. - Now depends on billiard 2.7.3.17
  1212. - Fixes request stack protection when app is initialized more than
  1213. once (Issue #1003).
  1214. - ETA tasks now properly works when system timezone is not the same
  1215. as the configured timezone (Issue #1004).
  1216. - Terminating a task now works if the task has been sent to the
  1217. pool but not yet acknowledged by a pool process (Issue #1007).
  1218. Fix contributed by Alexey Zatelepin
  1219. - Terminating a task now properly updates the state of the task to revoked,
  1220. and sends a ``task-revoked`` event.
  1221. - Generic worker init script now waits for workers to shutdown by default.
  1222. - Multi: No longer parses --app option (Issue #1008).
  1223. - Multi: stop_verify command renamed to stopwait.
  1224. - Daemonization: Now delays trying to create pidfile/logfile until after
  1225. the working directory has been changed into.
  1226. - :program:`celery worker` and :program:`celery beat` commands now respects
  1227. the :option:`--no-color` option (Issue #999).
  1228. - Fixed typos in eventlet examples (Issue #1000)
  1229. Fix contributed by Bryan Bishop.
  1230. Congratulations on opening bug #1000!
  1231. - Tasks that raise :exc:`~celery.exceptions.Ignore` are now acknowledged.
  1232. - Beat: Now shows the name of the entry in ``sending due task`` logs.
  1233. .. _version-3.0.10:
  1234. 3.0.10
  1235. ======
  1236. :release-date: 2012-09-20 05:30 P.M BST
  1237. - Now depends on kombu 2.4.7
  1238. - Now depends on billiard 2.7.3.14
  1239. - Fixes crash at startup when using Django and pre-1.4 projects
  1240. (setup_environ).
  1241. - Hard time limits now sends the KILL signal shortly after TERM,
  1242. to terminate processes that have signal handlers blocked by C extensions.
  1243. - Billiard now installs even if the C extension cannot be built.
  1244. It's still recommended to build the C extension if you are using
  1245. a transport other than rabbitmq/redis (or use forced execv for some
  1246. other reason).
  1247. - Pool now sets a ``current_process().index`` attribute that can be used to create
  1248. as many log files as there are processes in the pool.
  1249. - Canvas: chord/group/chain no longer modifies the state when called
  1250. Previously calling a chord/group/chain would modify the ids of subtasks
  1251. so that:
  1252. .. code-block:: python
  1253. >>> c = chord([add.s(2, 2), add.s(4, 4)], xsum.s())
  1254. >>> c()
  1255. >>> c() <-- call again
  1256. at the second time the ids for the tasks would be the same as in the
  1257. previous invocation. This is now fixed, so that calling a subtask
  1258. won't mutate any options.
  1259. - Canvas: Chaining a chord to another task now works (Issue #965).
  1260. - Worker: Fixed a bug where the request stack could be corrupted if
  1261. relative imports are used.
  1262. Problem usually manifested itself as an exception while trying to
  1263. send a failed task result (``NoneType does not have id attribute``).
  1264. Fix contributed by Sam Cooke.
  1265. - Tasks can now raise :exc:`~celery.exceptions.Ignore` to skip updating states
  1266. or events after return.
  1267. Example:
  1268. .. code-block:: python
  1269. from celery.exceptions import Ignore
  1270. @task
  1271. def custom_revokes():
  1272. if redis.sismember('tasks.revoked', custom_revokes.request.id):
  1273. raise Ignore()
  1274. - The worker now makes sure the request/task stacks are not modified
  1275. by the initial ``Task.__call__``.
  1276. This would previously be a problem if a custom task class defined
  1277. ``__call__`` and also called ``super()``.
  1278. - Because of problems the fast local optimization has been disabled,
  1279. and can only be enabled by setting the :envvar:`USE_FAST_LOCALS` attribute.
  1280. - Worker: Now sets a default socket timeout of 5 seconds at shutdown
  1281. so that broken socket reads do not hinder proper shutdown (Issue #975).
  1282. - More fixes related to late eventlet/gevent patching.
  1283. - Documentation for settings out of sync with reality:
  1284. - :setting:`CELERY_TASK_PUBLISH_RETRY`
  1285. Documented as disabled by default, but it was enabled by default
  1286. since 2.5 as stated by the 2.5 changelog.
  1287. - :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`
  1288. The default max_retries had been set to 100, but documented as being
  1289. 3, and the interval_max was set to 1 but documented as 0.2.
  1290. The default setting are now set to 3 and 0.2 as it was originally
  1291. documented.
  1292. Fix contributed by Matt Long.
  1293. - Worker: Log messages when connection established and lost have been improved.
  1294. - The repr of a crontab schedule value of '0' should be '*' (Issue #972).
  1295. - Revoked tasks are now removed from reserved/active state in the worker
  1296. (Issue #969)
  1297. Fix contributed by Alexey Zatelepin.
  1298. - gevent: Now supports hard time limits using ``gevent.Timeout``.
  1299. - Documentation: Links to init scripts now point to the 3.0 branch instead
  1300. of the development branch (master).
  1301. - Documentation: Fixed typo in signals user guide (Issue #986).
  1302. ``instance.app.queues`` -> ``instance.app.amqp.queues``.
  1303. - Eventlet/gevent: The worker did not properly set the custom app
  1304. for new greenlets.
  1305. - Eventlet/gevent: Fixed a bug where the worker could not recover
  1306. from connection loss (Issue #959).
  1307. Also, because of a suspected bug in gevent the
  1308. :setting:`BROKER_CONNECTION_TIMEOUT` setting has been disabled
  1309. when using gevent
  1310. 3.0.9
  1311. =====
  1312. :release-date: 2012-08-31 06:00 P.M BST
  1313. - Important note for users of Django and the database scheduler!
  1314. Recently a timezone issue has been fixed for periodic tasks,
  1315. but erroneous timezones could have already been stored in the
  1316. database, so for the fix to work you need to reset
  1317. the ``last_run_at`` fields.
  1318. You can do this by executing the following command:
  1319. .. code-block:: bash
  1320. $ python manage.py shell
  1321. >>> from djcelery.models import PeriodicTask
  1322. >>> PeriodicTask.objects.update(last_run_at=None)
  1323. You also have to do this if you change the timezone or
  1324. :setting:`CELERY_ENABLE_UTC` setting.
  1325. - Note about the :setting:`CELERY_ENABLE_UTC` setting.
  1326. If you previously disabled this just to force periodic tasks to work with
  1327. your timezone, then you are now *encouraged to re-enable it*.
  1328. - Now depends on Kombu 2.4.5 which fixes PyPy + Jython installation.
  1329. - Fixed bug with timezones when :setting:`CELERY_ENABLE_UTC` is disabled
  1330. (Issue #952).
  1331. - Fixed a typo in the celerybeat upgrade mechanism (Issue #951).
  1332. - Make sure the `exc_info` argument to logging is resolved (Issue #899).
  1333. - Fixed problem with Python 3.2 and thread join timeout overflow (Issue #796).
  1334. - A test case was occasionally broken for Python 2.5.
  1335. - Unit test suite now passes for PyPy 1.9.
  1336. - App instances now supports the with statement.
  1337. This calls the new :meth:`~celery.Celery.close` method at exit, which
  1338. cleans up after the app like closing pool connections.
  1339. Note that this is only necessary when dynamically creating apps,
  1340. e.g. for "temporary" apps.
  1341. - Support for piping a subtask to a chain.
  1342. For example:
  1343. .. code-block:: python
  1344. pipe = sometask.s() | othertask.s()
  1345. new_pipe = mytask.s() | pipe
  1346. Contributed by Steve Morin.
  1347. - Fixed problem with group results on non-pickle serializers.
  1348. Fix contributed by Steeve Morin.
  1349. .. _version-3.0.8:
  1350. 3.0.8
  1351. =====
  1352. :release-date: 2012-08-29 05:00 P.M BST
  1353. - Now depends on Kombu 2.4.4
  1354. - Fixed problem with amqplib and receiving larger message payloads
  1355. (Issue #922).
  1356. The problem would manifest itself as either the worker hanging,
  1357. or occasionally a ``Framing error`` exception appearing.
  1358. Users of the new ``pyamqp://`` transport must upgrade to
  1359. :mod:`amqp` 0.9.3.
  1360. - Beat: Fixed another timezone bug with interval and crontab schedules
  1361. (Issue #943).
  1362. - Beat: The schedule file is now automatically cleared if the timezone
  1363. is changed.
  1364. The schedule is also cleared when you upgrade to 3.0.8 from an earlier
  1365. version, this to register the initial timezone info.
  1366. - Events: The :event:`worker-heartbeat` event now include processed and active
  1367. count fields.
  1368. Contributed by Mher Movsisyan.
  1369. - Fixed error with error email and new task classes (Issue #931).
  1370. - ``BaseTask.__call__`` is no longer optimized away if it has been monkey
  1371. patched.
  1372. - Fixed shutdown issue when using gevent (Issue #911 & Issue #936).
  1373. Fix contributed by Thomas Meson.
  1374. .. _version-3.0.7:
  1375. 3.0.7
  1376. =====
  1377. :release-date: 2012-08-24 05:00 P.M BST
  1378. - Fixes several problems with periodic tasks and timezones (Issue #937).
  1379. - Now depends on kombu 2.4.2
  1380. - Redis: Fixes a race condition crash
  1381. - Fixes an infinite loop that could happen when retrying establishing
  1382. the broker connection.
  1383. - Daemons now redirect standard file descriptors to :file:`/dev/null`
  1384. Though by default the standard outs are also redirected
  1385. to the logger instead, but you can disable this by changing
  1386. the :setting:`CELERY_REDIRECT_STDOUTS` setting.
  1387. - Fixes possible problems when eventlet/gevent is patched too late.
  1388. - ``LoggingProxy`` no longer defines ``fileno()`` (Issue #928).
  1389. - Results are now ignored for the chord unlock task.
  1390. Fix contributed by Steeve Morin.
  1391. - Cassandra backend now works if result expiry is disabled.
  1392. Fix contributed by Steeve Morin.
  1393. - The traceback object is now passed to signal handlers instead
  1394. of the string representation.
  1395. Fix contributed by Adam DePue.
  1396. - Celery command: Extensions are now sorted by name.
  1397. - A regression caused the :event:`task-failed` event to be sent
  1398. with the exception object instead of its string representation.
  1399. - The worker daemon would try to create the pid file before daemonizing
  1400. to catch errors, but this file was not immediately released (Issue #923).
  1401. - Fixes Jython compatibility.
  1402. - ``billiard.forking_enable`` was called by all pools not just the
  1403. processes pool, which would result in a useless warning if the billiard
  1404. C extensions were not installed.
  1405. .. _version-3.0.6:
  1406. 3.0.6
  1407. =====
  1408. :release-date: 2012-08-17 11:00 P.M BST
  1409. - Now depends on kombu 2.4.0
  1410. - Now depends on billiard 2.7.3.12
  1411. - Redis: Celery now tries to restore messages whenever there are no messages
  1412. in the queue.
  1413. - Crontab schedules now properly respects :setting:`CELERY_TIMEZONE` setting.
  1414. It's important to note that crontab schedules uses UTC time by default
  1415. unless this setting is set.
  1416. Issue #904 and django-celery #150.
  1417. - ``billiard.enable_forking`` is now only set by the processes pool.
  1418. - The transport is now properly shown by :program:`celery report`
  1419. (Issue #913).
  1420. - The `--app` argument now works if the last part is a module name
  1421. (Issue #921).
  1422. - Fixed problem with unpickleable exceptions (billiard #12).
  1423. - Adds ``task_name`` attribute to ``EagerResult`` which is always
  1424. :const:`None` (Issue #907).
  1425. - Old Task class in :mod:`celery.task` no longer accepts magic kwargs by
  1426. default (Issue #918).
  1427. A regression long ago disabled magic kwargs for these, and since
  1428. no one has complained about it we don't have any incentive to fix it now.
  1429. - The ``inspect reserved`` control command did not work properly.
  1430. - Should now play better with static analyzation tools by explicitly
  1431. specifying dynamically created attributes in the :mod:`celery` and
  1432. :mod:`celery.task` modules.
  1433. - Terminating a task now results in
  1434. :exc:`~celery.exceptions.RevokedTaskError` instead of a ``WorkerLostError``.
  1435. - ``AsyncResult.revoke`` now accepts ``terminate`` and ``signal`` arguments.
  1436. - The :event:`task-revoked` event now includes new fields: ``terminated``,
  1437. ``signum``, and ``expired``.
  1438. - The argument to :class:`~celery.exceptions.TaskRevokedError` is now one
  1439. of the reasons ``revoked``, ``expired`` or ``terminated``.
  1440. - Old Task class does no longer use classmethods for push_request and
  1441. pop_request (Issue #912).
  1442. - ``GroupResult`` now supports the ``children`` attribute (Issue #916).
  1443. - ``AsyncResult.collect`` now respects the ``intermediate`` argument
  1444. (Issue #917).
  1445. - Fixes example task in documentation (Issue #902).
  1446. - Eventlet fixed so that the environment is patched as soon as possible.
  1447. - eventlet: Now warns if celery related modules that depends on threads
  1448. are imported before eventlet is patched.
  1449. - Improved event and camera examples in the monitoring guide.
  1450. - Disables celery command setuptools entrypoints if the command can't be
  1451. loaded.
  1452. - Fixed broken ``dump_request`` example in the tasks guide.
  1453. .. _version-3.0.5:
  1454. 3.0.5
  1455. =====
  1456. :release-date: 2012-08-01 04:00 P.M BST
  1457. - Now depends on kombu 2.3.1 + billiard 2.7.3.11
  1458. - Fixed a bug with the -B option (``cannot pickle thread.lock objects``)
  1459. (Issue #894 + Issue #892, + django-celery #154).
  1460. - The :control:`restart_pool` control command now requires the
  1461. :setting:`CELERYD_POOL_RESTARTS` setting to be enabled
  1462. This change was necessary as the multiprocessing event that the restart
  1463. command depends on is responsible for creating many semaphores/file
  1464. descriptors, resulting in problems in some environments.
  1465. - ``chain.apply`` now passes args to the first task (Issue #889).
  1466. - Documented previously secret options to the Django-Celery monitor
  1467. in the monitoring userguide (Issue #396).
  1468. - Old changelog are now organized in separate documents for each series,
  1469. see :ref:`history`.
  1470. .. _version-3.0.4:
  1471. 3.0.4
  1472. =====
  1473. :release-date: 2012-07-26 07:00 P.M BST
  1474. - Now depends on Kombu 2.3
  1475. - New experimental standalone Celery monitor: Flower
  1476. See :ref:`monitoring-flower` to read more about it!
  1477. Contributed by Mher Movsisyan.
  1478. - Now supports AMQP heartbeats if using the new ``pyamqp://`` transport.
  1479. - The py-amqp transport requires the :mod:`amqp` library to be installed::
  1480. $ pip install amqp
  1481. - Then you need to set the transport URL prefix to ``pyamqp://``.
  1482. - The default heartbeat value is 10 seconds, but this can be changed using
  1483. the :setting:`BROKER_HEARTBEAT` setting::
  1484. BROKER_HEARTBEAT = 5.0
  1485. - If the broker heartbeat is set to 10 seconds, the heartbeats will be
  1486. monitored every 5 seconds (double the hertbeat rate).
  1487. See the `Kombu 2.3 changelog`_ for more information.
  1488. .. _`Kombu 2.3 changelog`:
  1489. http://kombu.readthedocs.org/en/latest/changelog.html#version-2-3-0
  1490. - Now supports RabbitMQ Consumer Cancel Notifications, using the ``pyamqp://``
  1491. transport.
  1492. This is essential when running RabbitMQ in a cluster.
  1493. See the `Kombu 2.3 changelog`_ for more information.
  1494. - Delivery info is no longer passed directly through.
  1495. It was discovered that the SQS transport adds objects that can't
  1496. be pickled to the delivery info mapping, so we had to go back
  1497. to using the whitelist again.
  1498. Fixing this bug also means that the SQS transport is now working again.
  1499. - The semaphore was not properly released when a task was revoked (Issue #877).
  1500. This could lead to tasks being swallowed and not released until a worker
  1501. restart.
  1502. Thanks to Hynek Schlawack for debugging the issue.
  1503. - Retrying a task now also forwards any linked tasks.
  1504. This means that if a task is part of a chain (or linked in some other
  1505. way) and that even if the task is retried, then the next task in the chain
  1506. will be executed when the retry succeeds.
  1507. - Chords: Now supports setting the interval and other keyword arguments
  1508. to the chord unlock task.
  1509. - The interval can now be set as part of the chord subtasks kwargs::
  1510. chord(header)(body, interval=10.0)
  1511. - In addition the chord unlock task now honors the Task.default_retry_delay
  1512. option, used when none is specified, which also means that the default
  1513. interval can also be changed using annotations:
  1514. .. code-block:: python
  1515. CELERY_ANNOTATIONS = {
  1516. 'celery.chord_unlock': {
  1517. 'default_retry_delay': 10.0,
  1518. }
  1519. }
  1520. - New :meth:`@Celery.add_defaults` method can add new default configuration
  1521. dicts to the applications configuration.
  1522. For example::
  1523. config = {'FOO': 10}
  1524. celery.add_defaults(config)
  1525. is the same as ``celery.conf.update(config)`` except that data will not be
  1526. copied, and that it will not be pickled when the worker spawns child
  1527. processes.
  1528. In addition the method accepts a callable::
  1529. def initialize_config():
  1530. # insert heavy stuff that can't be done at import time here.
  1531. celery.add_defaults(initialize_config)
  1532. which means the same as the above except that it will not happen
  1533. until the celery configuration is actually used.
  1534. As an example, Celery can lazily use the configuration of a Flask app::
  1535. flask_app = Flask()
  1536. celery = Celery()
  1537. celery.add_defaults(lambda: flask_app.config)
  1538. - Revoked tasks were not marked as revoked in the result backend (Issue #871).
  1539. Fix contributed by Hynek Schlawack.
  1540. - Eventloop now properly handles the case when the epoll poller object
  1541. has been closed (Issue #882).
  1542. - Fixed syntax error in ``funtests/test_leak.py``
  1543. Fix contributed by Catalin Iacob.
  1544. - group/chunks: Now accepts empty task list (Issue #873).
  1545. - New method names:
  1546. - ``Celery.default_connection()`` ➠ :meth:`~@Celery.connection_or_acquire`.
  1547. - ``Celery.default_producer()`` ➠ :meth:`~@Celery.producer_or_acquire`.
  1548. The old names still work for backward compatibility.
  1549. .. _version-3.0.3:
  1550. 3.0.3
  1551. =====
  1552. :release-date: 2012-07-20 09:17 P.M BST
  1553. :by: Ask Solem
  1554. - amqplib passes the channel object as part of the delivery_info
  1555. and it's not pickleable, so we now remove it.
  1556. .. _version-3.0.2:
  1557. 3.0.2
  1558. =====
  1559. :release-date: 2012-07-20 04:00 P.M BST
  1560. :by: Ask Solem
  1561. - A bug caused the following task options to not take defaults from the
  1562. configuration (Issue #867 + Issue #858)
  1563. The following settings were affected:
  1564. - :setting:`CELERY_IGNORE_RESULT`
  1565. - :setting:`CELERYD_SEND_TASK_ERROR_EMAILS`
  1566. - :setting:`CELERY_TRACK_STARTED`
  1567. - :setting:`CElERY_STORE_ERRORS_EVEN_IF_IGNORED`
  1568. Fix contributed by John Watson.
  1569. - Task Request: ``delivery_info`` is now passed through as-is (Issue #807).
  1570. - The eta argument now supports datetime's with a timezone set (Issue #855).
  1571. - The worker's banner displayed the autoscale settings in the wrong order
  1572. (Issue #859).
  1573. - Extension commands are now loaded after concurrency is set up
  1574. so that they don't interfere with e.g. eventlet patching.
  1575. - Fixed bug in the threaded pool (Issue #863)
  1576. - The task failure handler mixed up the fields in :func:`sys.exc_info`.
  1577. Fix contributed by Rinat Shigapov.
  1578. - Fixed typos and wording in the docs.
  1579. Fix contributed by Paul McMillan
  1580. - New setting: :setting:`CELERY_WORKER_DIRECT`
  1581. If enabled each worker will consume from their own dedicated queue
  1582. which can be used to route tasks to specific workers.
  1583. - Fixed several edge case bugs in the add consumer remote control command.
  1584. - :mod:`~celery.contrib.migrate`: Can now filter and move tasks to specific
  1585. workers if :setting:`CELERY_WORKER_DIRECT` is enabled.
  1586. Among other improvements, the following functions have been added:
  1587. * ``move_direct(filterfun, **opts)``
  1588. * ``move_direct_by_id(task_id, worker_hostname, **opts)``
  1589. * ``move_direct_by_idmap({task_id: worker_hostname, ...}, **opts)``
  1590. * ``move_direct_by_taskmap({task_name: worker_hostname, ...}, **opts)``
  1591. - :meth:`~celery.Celery.default_connection` now accepts a pool argument that
  1592. if set to false causes a new connection to be created instead of acquiring
  1593. one from the pool.
  1594. - New signal: :signal:`celeryd_after_setup`.
  1595. - Default loader now keeps lowercase attributes from the configuration module.
  1596. .. _version-3.0.1:
  1597. 3.0.1
  1598. =====
  1599. :release-date: 2012-07-10 06:00 P.M BST
  1600. :by: Ask Solem
  1601. - Now depends on kombu 2.2.5
  1602. - inspect now supports limit argument::
  1603. myapp.control.inspect(limit=1).ping()
  1604. - Beat: now works with timezone aware datetime's.
  1605. - Task classes inheriting ``from celery import Task``
  1606. mistakingly enabled ``accept_magic_kwargs``.
  1607. - Fixed bug in ``inspect scheduled`` (Issue #829).
  1608. - Beat: Now resets the schedule to upgrade to UTC.
  1609. - The :program:`celery worker` command now works with eventlet/gevent.
  1610. Previously it would not patch the environment early enough.
  1611. - The :program:`celery` command now supports extension commands
  1612. using setuptools entry-points.
  1613. Libraries can add additional commands to the :program:`celery`
  1614. command by adding an entry-point like::
  1615. setup(
  1616. entry_points=[
  1617. 'celery.commands': [
  1618. 'foo = my.module:Command',
  1619. ],
  1620. ],
  1621. ...)
  1622. The command must then support the interface of
  1623. :class:`celery.bin.base.Command`.
  1624. - contrib.migrate: New utilities to move tasks from one queue to another.
  1625. - :func:`~celery.contrib.migrate.move_tasks`
  1626. - :func:`~celery.contrib.migrate.move_task_by_id`
  1627. - The :event:`task-sent` event now contains ``exchange`` and ``routing_key``
  1628. fields.
  1629. - Fixes bug with installing on Python 3.
  1630. Fix contributed by Jed Smith.
  1631. .. _version-3.0.0:
  1632. 3.0.0 (Chiastic Slide)
  1633. ======================
  1634. :release-date: 2012-07-07 01:30 P.M BST
  1635. :by: Ask Solem
  1636. See :ref:`whatsnew-3.0`.