changelog-3.0.rst 78 KB

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