changelog-3.0.rst 82 KB

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