Changelog 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330
  1. .. _changelog:
  2. ================
  3. Change history
  4. ================
  5. .. contents::
  6. :local:
  7. If you're looking for versions prior to 3.0.x you should go to :ref:`history`.
  8. .. _version-3.0.18:
  9. 3.0.18
  10. ======
  11. :release-date: 2013-04-12 XX:XX:XX P.M BST
  12. - Now depends on :mod:`kombu` 2.5.10.
  13. See the :ref:`changelog <kombu:version-2.5.10>`.
  14. - Now depends on :mod:`billiard` 2.7.3.26.
  15. - Fixed deadlock in the multiprocessing pool that was caused by the
  16. semaphore not being released at shutdown.
  17. - Processes Pool: It's now possible to debug pool processes using GDB.
  18. - Connection URLs now ignore multiple '+' tokens.
  19. - Worker/statedb: Now uses pickle protocol 2 (Py2.5+)
  20. - Many Python 3 compatibility fixes.
  21. - Worker: A warning is now given if a worker is started with the
  22. same node name as an existing worker.
  23. - Fixed a deadlock that could occur while revoking tasks (Issue #1297).
  24. - Worker: The :sig:`HUP` handler now closes all open file descriptors
  25. before restarting to ensure file descriptors does not leak (Issue #1270).
  26. - Worker: Optimized storing/loading the revoked tasks list (Issue #1289).
  27. After this change the ``--statedb`` file will take up more disk space,
  28. but loading from and storing the revoked tasks will be considerably
  29. faster (what before took 5 minutes will now take less than a second).
  30. - Celery will now suggest alternatives if there's a typo in the
  31. broker transport name (e.g. ``ampq`` -> ``amqp``).
  32. - Worker: The auto-reloader would cause a crash if a monitored file
  33. was unlinked.
  34. Fix contributed by Agris Ameriks.
  35. - Fixed AsyncResult pickling error.
  36. Fix contributed by Thomas Minor.
  37. - Can now specify a whitelist of accepted serializers using
  38. the :setting:`CELERY_ACCEPT_CONTENT` setting.
  39. This means that you can force the worker to discard messages
  40. serialized with pickle and other untrusted serializers.
  41. For example to only allow JSON serialized messages use::
  42. CELERY_ACCEPT_CONTENT = ['json']
  43. you can also use MIME types in the whitelist::
  44. CELERY_ACCEPT_CONTENT = ['application/json']
  45. - Fixed handling of Unicode in logging output when using log colors
  46. (Issue #427).
  47. - :class:`~celery.app.utils.ConfigurationView` is now a ``MutableMapping``.
  48. Contributed by Aaron Harnly.
  49. - Fixed memory leak in LRU cache implementation.
  50. Fix contributed by Romuald Brunet.
  51. - ``celery.contrib.rdb``: Now works when sockets are in non-blocking mode.
  52. Fix contributed by Theo Spears.
  53. - The `inspect reserved` remote control command included active (started) tasks
  54. with the reserved tasks (Issue #1030).
  55. - The :signal:`task_failure` signal received a modified traceback object
  56. meant for pickling purposes, this has been fixed so that it now
  57. receives the real traceback instead.
  58. - The ``@task`` decorator silently ignored positional arguments,
  59. it now raises the expected :exc:`TypeError` instead (Issue #1125).
  60. - The worker will now properly handle messages with invalid
  61. eta/expires fields (Issue #1232).
  62. - The ``pool_restart`` remote control command now reports
  63. an error if the :setting:`CELERYD_POOL_RESTARTS` setting is not set.
  64. - ``celery.conf.add_defaults`` can now be used with non-dict objects.
  65. - Fixed compatability problems in the Proxy class (Issue #1087).
  66. The class attributes ``__module__``, ``__name__`` and ``__doc__``
  67. are now meaningful string objects.
  68. Thanks to Marius Gedminas.
  69. - MongoDB Backend: The :setting:`MONGODB_BACKEND_SETTINGS` setting
  70. now accepts a ``option`` key that lets you forward arbitrary kwargs
  71. to the underlying ``pymongo.Connection` object (Issue #1015).
  72. - Beat: The daily backend cleanup task is no longer enabled
  73. for result backends that support automatic result expiration (Issue #1031).
  74. - Canvas list operations now takes application instance from the first
  75. task in the list, instead of depending on the ``current_app`` (Issue #1249).
  76. - Worker: Message decoding error log message now includes traceback
  77. information.
  78. .. _version-3.0.17:
  79. 3.0.17
  80. ======
  81. :release-date: 2013-03-22 04:00:00 P.M UTC
  82. - Now depends on kombu 2.5.8
  83. - Now depends on billiard 2.7.3.23
  84. - RabbitMQ/Redis: thread-less and lock-free rate-limit implementation.
  85. This means that rate limits pose minimal overhead when used with
  86. RabbitMQ/Redis or future transports using the eventloop,
  87. and that the rate-limit implementation is now thread-less and lock-free.
  88. The thread-based transports will still use the old implementation for
  89. now, but the plan is to use the timer also for other
  90. broker transports in Celery 3.1.
  91. - Rate limits now works with eventlet/gevent if using RabbitMQ/Redis as the
  92. broker.
  93. - A regression caused ``task.retry`` to ignore additional keyword arguments.
  94. Extra keyword arguments are now used as execution options again.
  95. Fix contributed by Simon Engledew.
  96. - Windows: Fixed problem with the worker trying to pickle the Django settings
  97. module at worker startup.
  98. - generic-init.d: No longer double quotes ``$CELERYD_CHDIR`` (Issue #1235).
  99. - generic-init.d: Removes bash-specific syntax.
  100. Fix contributed by Pär Wieslander.
  101. - Cassandra Result Backend: Now handles the
  102. :exc:`~pycassa.AllServersUnavailable` error (Issue #1010).
  103. Fix contributed by Jared Biel.
  104. - Result: Now properly forwards apps to GroupResults when deserializing
  105. (Issue #1249).
  106. Fix contributed by Charles-Axel Dein.
  107. - ``GroupResult.revoke`` now supports the ``terminate`` and ``signal``
  108. keyword arguments.
  109. - Worker: Multiprocessing pool workers now import task modules/configuration
  110. before setting up the logging system so that logging signals can be
  111. connected before they're dispatched.
  112. - chord: The ``AsyncResult`` instance returned now has its ``parent``
  113. attribute set to the header ``GroupResult``.
  114. This is consistent with how ``chain`` works.
  115. .. _version-3.0.16:
  116. 3.0.16
  117. ======
  118. :release-date: 2013-03-07 04:00:00 P.M UTC
  119. - Happy International Women's Day!
  120. We have a long way to go, so this is a chance for you to get involved in one
  121. of the organizations working for making our communities more
  122. diverse.
  123. - PyLadies — http://pyladies.com
  124. - Girls Who Code — http://www.girlswhocode.com
  125. - Women Who Code — http://www.meetup.com/Women-Who-Code-SF/
  126. - Now depends on :mod:`kombu` version 2.5.7
  127. - Now depends on :mod:`billiard` version 2.7.3.22
  128. - AMQP heartbeats are now disabled by default.
  129. Some users experiences issues with heartbeats enabled,
  130. and it's not strictly necessary to use them.
  131. If you're experiencing problems detecting connection failures,
  132. you can re-enable heartbeats by configuring the :setting:`BROKER_HEARTBEAT`
  133. setting.
  134. - Worker: Now propagates connection errors occurring in multiprocessing
  135. callbacks, so that the connection can be reset (Issue #1226).
  136. - Worker: Now propagates connection errors occurring in timer callbacks,
  137. so that the connection can be reset.
  138. - The modules in :setting:`CELERY_IMPORTS` and :setting:`CELERY_INCLUDE`
  139. are now imported in the original order (Issue #1161).
  140. The modules in :setting:`CELERY_IMPORTS` will be imported first,
  141. then continued by :setting:`CELERY_INCLUDE`.
  142. Thanks to Joey Wilhelm.
  143. - New bash completion for ``celery`` available in the git repository:
  144. https://github.com/celery/celery/tree/3.0/extra/bash-completion
  145. You can source this file or put it in ``bash_completion.d`` to
  146. get auto-completion for the ``celery`` command-line utility.
  147. - The node name of a worker can now include unicode characters (Issue #1186).
  148. - The repr of a ``crontab`` object now displays correctly (Issue #972).
  149. - ``events.State`` no longer modifies the original event dictionary.
  150. - No longer uses ``Logger.warn`` deprecated in Python 3.
  151. - Cache Backend: Now works with chords again (Issue #1094).
  152. - Chord unlock now handles errors occurring while calling the callback.
  153. - Generic worker init.d script: Status check is now performed by
  154. querying the pid of the instance instead of sending messages.
  155. Contributed by Milen Pavlov.
  156. - Improved init scripts for CentOS.
  157. - Updated to support celery 3.x conventions.
  158. - Now uses CentOS built-in ``status`` and ``killproc``
  159. - Support for multi-node / multi-pid worker services.
  160. - Standard color-coded CentOS service-init output.
  161. - A test suite.
  162. Contributed by Milen Pavlov.
  163. - ``ResultSet.join`` now always works with empty result set (Issue #1219).
  164. - A ``group`` consisting of a single task is now supported (Issue #1219).
  165. - Now supports the ``pycallgraph`` program (Issue #1051).
  166. - Fixed Jython compatibility problems.
  167. - Django tutorial: Now mentions that the example app must be added to
  168. ``INSTALLED_APPS`` (Issue #1192).
  169. .. _version-3.0.15:
  170. 3.0.15
  171. ======
  172. :release-date: 2013-02-11 04:30:00 P.M UTC
  173. - Now depends on billiard 2.7.3.21 which fixed a syntax error crash.
  174. - Fixed bug with :setting:`CELERY_SEND_TASK_SENT_EVENT`.
  175. .. _version-3.0.14:
  176. 3.0.14
  177. ======
  178. :release-date: 2013-02-08 05:00:00 P.M UTC
  179. - Now depends on Kombu 2.5.6
  180. - Now depends on billiard 2.7.3.20
  181. - ``execv`` is now disabled by default.
  182. It was causing too many problems for users, you can still enable
  183. it using the :setting:`CELERYD_FORCE_EXECV` setting.
  184. execv was only enabled when transports other than amqp/redis was used,
  185. and it's there to prevent deadlocks caused by mutexes not being released
  186. before the process forks. Sadly it also changes the environment
  187. introducing many corner case bugs that is hard to fix without adding
  188. horrible hacks. Deadlock issues are reported far less often than the
  189. bugs that execv are causing, so we now disable it by default.
  190. Work is in motion to create non-blocking versions of these transports
  191. so that execv is not necessary (which is the situation with the amqp
  192. and redis broker transports)
  193. - Chord exception behavior defined (Issue #1172).
  194. From Celery 3.1 the chord callback will change state to FAILURE
  195. when a task part of a chord raises an exception.
  196. It was never documented what happens in this case,
  197. and the actual behavior was very unsatisfactory, indeed
  198. it will just forward the exception value to the chord callback.
  199. For backward compatibility reasons we do not change to the new
  200. behavior in a bugfix release, even if the current behavior was
  201. never documented. Instead you can enable the
  202. :setting:`CELERY_CHORD_PROPAGATES` setting to get the new behavior
  203. that will be default from Celery 3.1.
  204. See more at :ref:`chord-errors`.
  205. - worker: Fixes bug with ignored and retried tasks.
  206. The ``on_chord_part_return`` and ``Task.after_return`` callbacks,
  207. nor the ``task_postrun`` signal should be called when the task was
  208. retried/ignored.
  209. Fix contributed by Vlad.
  210. - ``GroupResult.join_native`` now respects the ``propagate`` argument.
  211. - ``subtask.id`` added as an alias to ``subtask['options'].id``
  212. .. code-block:: python
  213. >>> s = add.s(2, 2)
  214. >>> s.id = 'my-id'
  215. >>> s['options']
  216. {'task_id': 'my-id'}
  217. >>> s.id
  218. 'my-id'
  219. - worker: Fixed error `Could not start worker processes` occurring
  220. when restarting after connection failure (Issue #1118).
  221. - Adds new signal :signal:`task-retried` (Issue #1169).
  222. - `celery events --dumper` now handles connection loss.
  223. - Will now retry sending the task-sent event in case of connection failure.
  224. - amqp backend: Now uses ``Message.requeue`` instead of republishing
  225. the message after poll.
  226. - New :setting:`BROKER_HEARTBEAT_CHECKRATE` setting introduced to modify the
  227. rate at which broker connection heartbeats are monitored.
  228. The default value was also changed from 3.0 to 2.0.
  229. - :class:`celery.events.state.State` is now pickleable.
  230. Fix contributed by Mher Movsisyan.
  231. - :class:`celery.datastructures.LRUCache` is now pickleable.
  232. Fix contributed by Mher Movsisyan.
  233. - The stats broadcast command now includes the workers pid.
  234. Contributed by Mher Movsisyan.
  235. - New ``conf`` remote control command to get a workers current configuration.
  236. Contributed by Mher Movsisyan.
  237. - Adds the ability to modify the chord unlock task's countdown
  238. argument (Issue #1146).
  239. Contributed by Jun Sakai
  240. - beat: The scheduler now uses the `now()`` method of the schedule,
  241. so that schedules can provide a custom way to get the current date and time.
  242. Contributed by Raphaël Slinckx
  243. - Fixed pickling of configuration modules on Windows or when execv is used
  244. (Issue #1126).
  245. - Multiprocessing logger is now configured with loglevel ``ERROR``
  246. by default.
  247. Since 3.0 the multiprocessing loggers were disabled by default
  248. (only configured when the :envvar:`MP_LOG` environment variable was set).
  249. .. _version-3.0.13:
  250. 3.0.13
  251. ======
  252. :release-date: 2013-01-07 04:00:00 P.M UTC
  253. - Now depends on Kombu 2.5
  254. - py-amqp has replaced amqplib as the default transport,
  255. gaining support for AMQP 0.9, and the RabbitMQ extensions
  256. including Consumer Cancel Notifications and heartbeats.
  257. - support for multiple connection URLs for failover.
  258. - Read more in the :ref:`Kombu 2.5 changelog <kombu:version-2.5.0>`.
  259. - Now depends on billiard 2.7.3.19
  260. - Fixed a deadlock issue that could occur when the producer pool
  261. inherited the connection pool instance of the parent process.
  262. - The :option:`--loader` option now works again (Issue #1066).
  263. - :program:`celery` umbrella command: All subcommands now supports
  264. the :option:`--workdir` option (Issue #1063).
  265. - Groups included in chains now give GroupResults (Issue #1057)
  266. Previously it would incorrectly add a regular result instead of a group
  267. result, but now this works:
  268. .. code-block:: python
  269. # [4 + 4, 4 + 8, 16 + 8]
  270. >>> res = (add.s(2, 2) | group(add.s(4), add.s(8), add.s(16)))()
  271. >>> res
  272. <GroupResult: a0acf905-c704-499e-b03a-8d445e6398f7 [
  273. 4346501c-cb99-4ad8-8577-12256c7a22b1,
  274. b12ead10-a622-4d44-86e9-3193a778f345,
  275. 26c7a420-11f3-4b33-8fac-66cd3b62abfd]>
  276. - Chains can now chain other chains and use partial arguments (Issue #1057).
  277. Example:
  278. .. code-block:: python
  279. >>> c1 = (add.s(2) | add.s(4))
  280. >>> c2 = (add.s(8) | add.s(16))
  281. >>> c3 = (c1 | c2)
  282. # 8 + 2 + 4 + 8 + 16
  283. >>> assert c3(8).get() == 38
  284. - Subtasks can now be used with unregistered tasks.
  285. You can specify subtasks even if you just have the name::
  286. >>> s = subtask(task_name, args=(), kwargs=())
  287. >>> s.delay()
  288. - The :program:`celery shell` command now always adds the current
  289. directory to the module path.
  290. - The worker will now properly handle the :exc:`pytz.AmbiguousTimeError`
  291. exception raised when an ETA/countdown is prepared while being in DST
  292. transition (Issue #1061).
  293. - force_execv: Now makes sure that task symbols in the original
  294. task modules will always use the correct app instance (Issue #1072).
  295. - AMQP Backend: Now republishes result messages that have been polled
  296. (using ``result.ready()`` and friends, ``result.get()`` will not do this
  297. in this version).
  298. - Crontab schedule values can now "wrap around"
  299. This means that values like ``11-1`` translates to ``[11, 12, 1]``.
  300. Contributed by Loren Abrams.
  301. - multi stopwait command now shows the pid of processes.
  302. Contributed by Loren Abrams.
  303. - Handling of ETA/countdown fixed when the :setting:`CELERY_ENABLE_UTC`
  304. setting is disabled (Issue #1065).
  305. - A number of uneeded properties were included in messages,
  306. caused by accidentally passing ``Queue.as_dict`` as message properties.
  307. - Rate limit values can now be float
  308. This also extends the string format so that values like ``"0.5/s"`` works.
  309. Contributed by Christoph Krybus
  310. - Fixed a typo in the broadcast routing documentation (Issue #1026).
  311. - Rewrote confusing section about idempotence in the task user guide.
  312. - Fixed typo in the daemonization tutorial (Issue #1055).
  313. - Fixed several typos in the documentation.
  314. Contributed by Marius Gedminas.
  315. - Batches: Now works when using the eventlet pool.
  316. Fix contributed by Thomas Grainger.
  317. - Batches: Added example sending results to :mod:`celery.contrib.batches`.
  318. Contributed by Thomas Grainger.
  319. - Mongodb backend: Connection ``max_pool_size`` can now be set in
  320. :setting:`CELERY_MONGODB_BACKEND_SETTINGS`.
  321. Contributed by Craig Younkins.
  322. - Fixed problem when using earlier versions of :mod:`pytz`.
  323. Fix contributed by Vlad.
  324. - Docs updated to include the default value for the
  325. :setting:`CELERY_TASK_RESULT_EXPIRES` setting.
  326. - Improvements to the django-celery tutorial.
  327. Contributed by Locker537.
  328. - The ``add_consumer`` control command did not properly persist
  329. the addition of new queues so that they survived connection failure
  330. (Issue #1079).
  331. 3.0.12
  332. ======
  333. :release-date: 2012-11-06 02:00 P.M UTC
  334. - Now depends on kombu 2.4.8
  335. - [Redis] New and improved fair queue cycle algorithm (Kevin McCarthy).
  336. - [Redis] Now uses a Redis-based mutex when restoring messages.
  337. - [Redis] Number of messages that can be restored in one interval is no
  338. longer limited (but can be set using the
  339. ``unacked_restore_limit``
  340. :setting:`transport option <BROKER_TRANSPORT_OPTIONS>`.)
  341. - Heartbeat value can be specified in broker URLs (Mher Movsisyan).
  342. - Fixed problem with msgpack on Python 3 (Jasper Bryant-Greene).
  343. - Now depends on billiard 2.7.3.18
  344. - Celery can now be used with static analysis tools like PyDev/PyCharm/pylint
  345. etc.
  346. - Development documentation has moved to Read The Docs.
  347. The new URL is: http://docs.celeryproject.org/en/master
  348. - New :setting:`CELERY_QUEUE_HA_POLICY` setting used to set the default
  349. HA policy for queues when using RabbitMQ.
  350. - New method ``Task.subtask_from_request`` returns a subtask using the current
  351. request.
  352. - Results get_many method did not respect timeout argument.
  353. Fix contributed by Remigiusz Modrzejewski
  354. - generic_init.d scripts now support setting :envvar:`CELERY_CREATE_DIRS` to
  355. always create log and pid directories (Issue #1045).
  356. This can be set in your :file:`/etc/default/celeryd`.
  357. - Fixed strange kombu import problem on Python 3.2 (Issue #1034).
  358. - Worker: ETA scheduler now uses millisecond precision (Issue #1040).
  359. - The ``--config`` argument to programs is now supported by all loaders.
  360. - The :setting:`CASSANDRA_OPTIONS` setting has now been documented.
  361. Contributed by Jared Biel.
  362. - Task methods (:mod:`celery.contrib.methods`) cannot be used with the old
  363. task base class, the task decorator in that module now inherits from the new.
  364. - An optimization was too eager and caused some logging messages to never emit.
  365. - :mod:`celery.contrib.batches` now works again.
  366. - Fixed missing whitespace in ``bdist_rpm`` requirements (Issue #1046).
  367. - Event state's ``tasks_by_name`` applied limit before filtering by name.
  368. Fix contributed by Alexander A. Sosnovskiy.
  369. .. _version-3.0.11:
  370. 3.0.11
  371. ======
  372. :release-date: 2012-09-26 04:00 P.M UTC
  373. - [security:low] generic-init.d scripts changed permissions of /var/log & /var/run
  374. In the daemonization tutorial the recommended directories were as follows:
  375. .. code-block:: bash
  376. CELERYD_LOG_FILE="/var/log/celery/%n.log"
  377. CELERYD_PID_FILE="/var/run/celery/%n.pid"
  378. But in the scripts themselves the default files were ``/var/log/celery%n.log``
  379. and ``/var/run/celery%n.pid``, so if the user did not change the location
  380. by configuration, the directories ``/var/log`` and ``/var/run`` would be
  381. created - and worse have their permissions and owners changed.
  382. This change means that:
  383. - Default pid file is ``/var/run/celery/%n.pid``
  384. - Default log file is ``/var/log/celery/%n.log``
  385. - The directories are only created and have their permissions
  386. changed if *no custom locations are set*.
  387. Users can force paths to be created by calling the ``create-paths``
  388. subcommand:
  389. .. code-block:: bash
  390. $ sudo /etc/init.d/celeryd create-paths
  391. .. admonition:: Upgrading Celery will not update init scripts
  392. To update the init scripts you have to re-download
  393. the files from source control and update them manually.
  394. You can find the init scripts for version 3.0.x at:
  395. http://github.com/celery/celery/tree/3.0/extra/generic-init.d
  396. - Now depends on billiard 2.7.3.17
  397. - Fixes request stack protection when app is initialized more than
  398. once (Issue #1003).
  399. - ETA tasks now properly works when system timezone is not the same
  400. as the configured timezone (Issue #1004).
  401. - Terminating a task now works if the task has been sent to the
  402. pool but not yet acknowledged by a pool process (Issue #1007).
  403. Fix contributed by Alexey Zatelepin
  404. - Terminating a task now properly updates the state of the task to revoked,
  405. and sends a ``task-revoked`` event.
  406. - Generic worker init script now waits for workers to shutdown by default.
  407. - Multi: No longer parses --app option (Issue #1008).
  408. - Multi: stop_verify command renamed to stopwait.
  409. - Daemonization: Now delays trying to create pidfile/logfile until after
  410. the working directory has been changed into.
  411. - :program:`celery worker` and :program:`celery beat` commands now respects
  412. the :option:`--no-color` option (Issue #999).
  413. - Fixed typos in eventlet examples (Issue #1000)
  414. Fix contributed by Bryan Bishop.
  415. Congratulations on opening bug #1000!
  416. - Tasks that raise :exc:`~celery.exceptions.Ignore` are now acknowledged.
  417. - Beat: Now shows the name of the entry in ``sending due task`` logs.
  418. .. _version-3.0.10:
  419. 3.0.10
  420. ======
  421. :release-date: 2012-09-20 05:30 P.M BST
  422. - Now depends on kombu 2.4.7
  423. - Now depends on billiard 2.7.3.14
  424. - Fixes crash at startup when using Django and pre-1.4 projects
  425. (setup_environ).
  426. - Hard time limits now sends the KILL signal shortly after TERM,
  427. to terminate processes that have signal handlers blocked by C extensions.
  428. - Billiard now installs even if the C extension cannot be built.
  429. It's still recommended to build the C extension if you are using
  430. a transport other than rabbitmq/redis (or use forced execv for some
  431. other reason).
  432. - Pool now sets a ``current_process().index`` attribute that can be used to create
  433. as many log files as there are processes in the pool.
  434. - Canvas: chord/group/chain no longer modifies the state when called
  435. Previously calling a chord/group/chain would modify the ids of subtasks
  436. so that:
  437. .. code-block:: python
  438. >>> c = chord([add.s(2, 2), add.s(4, 4)], xsum.s())
  439. >>> c()
  440. >>> c() <-- call again
  441. at the second time the ids for the tasks would be the same as in the
  442. previous invocation. This is now fixed, so that calling a subtask
  443. won't mutate any options.
  444. - Canvas: Chaining a chord to another task now works (Issue #965).
  445. - Worker: Fixed a bug where the request stack could be corrupted if
  446. relative imports are used.
  447. Problem usually manifested itself as an exception while trying to
  448. send a failed task result (``NoneType does not have id attribute``).
  449. Fix contributed by Sam Cooke.
  450. - Tasks can now raise :exc:`~celery.exceptions.Ignore` to skip updating states
  451. or events after return.
  452. Example:
  453. .. code-block:: python
  454. from celery.exceptions import Ignore
  455. @task
  456. def custom_revokes():
  457. if redis.sismember('tasks.revoked', custom_revokes.request.id):
  458. raise Ignore()
  459. - The worker now makes sure the request/task stacks are not modified
  460. by the initial ``Task.__call__``.
  461. This would previously be a problem if a custom task class defined
  462. ``__call__`` and also called ``super()``.
  463. - Because of problems the fast local optimization has been disabled,
  464. and can only be enabled by setting the :envvar:`USE_FAST_LOCALS` attribute.
  465. - Worker: Now sets a default socket timeout of 5 seconds at shutdown
  466. so that broken socket reads do not hinder proper shutdown (Issue #975).
  467. - More fixes related to late eventlet/gevent patching.
  468. - Documentation for settings out of sync with reality:
  469. - :setting:`CELERY_TASK_PUBLISH_RETRY`
  470. Documented as disabled by default, but it was enabled by default
  471. since 2.5 as stated by the 2.5 changelog.
  472. - :setting:`CELERY_TASK_PUBLISH_RETRY_POLICY`
  473. The default max_retries had been set to 100, but documented as being
  474. 3, and the interval_max was set to 1 but documented as 0.2.
  475. The default setting are now set to 3 and 0.2 as it was originally
  476. documented.
  477. Fix contributed by Matt Long.
  478. - Worker: Log messages when connection established and lost have been improved.
  479. - The repr of a crontab schedule value of '0' should be '*' (Issue #972).
  480. - Revoked tasks are now removed from reserved/active state in the worker
  481. (Issue #969)
  482. Fix contributed by Alexey Zatelepin.
  483. - gevent: Now supports hard time limits using ``gevent.Timeout``.
  484. - Documentation: Links to init scripts now point to the 3.0 branch instead
  485. of the development branch (master).
  486. - Documentation: Fixed typo in signals user guide (Issue #986).
  487. ``instance.app.queues`` -> ``instance.app.amqp.queues``.
  488. - Eventlet/gevent: The worker did not properly set the custom app
  489. for new greenlets.
  490. - Eventlet/gevent: Fixed a bug where the worker could not recover
  491. from connection loss (Issue #959).
  492. Also, because of a suspected bug in gevent the
  493. :setting:`BROKER_CONNECTION_TIMEOUT` setting has been disabled
  494. when using gevent
  495. 3.0.9
  496. =====
  497. :release-date: 2012-08-31 06:00 P.M BST
  498. - Important note for users of Django and the database scheduler!
  499. Recently a timezone issue has been fixed for periodic tasks,
  500. but erroneous timezones could have already been stored in the
  501. database, so for the fix to work you need to reset
  502. the ``last_run_at`` fields.
  503. You can do this by executing the following command:
  504. .. code-block:: bash
  505. $ python manage.py shell
  506. >>> from djcelery.models import PeriodicTask
  507. >>> PeriodicTask.objects.update(last_run_at=None)
  508. You also have to do this if you change the timezone or
  509. :setting:`CELERY_ENABLE_UTC` setting.
  510. - Note about the :setting:`CELERY_ENABLE_UTC` setting.
  511. If you previously disabled this just to force periodic tasks to work with
  512. your timezone, then you are now *encouraged to re-enable it*.
  513. - Now depends on Kombu 2.4.5 which fixes PyPy + Jython installation.
  514. - Fixed bug with timezones when :setting:`CELERY_ENABLE_UTC` is disabled
  515. (Issue #952).
  516. - Fixed a typo in the celerybeat upgrade mechanism (Issue #951).
  517. - Make sure the `exc_info` argument to logging is resolved (Issue #899).
  518. - Fixed problem with Python 3.2 and thread join timeout overflow (Issue #796).
  519. - A test case was occasionally broken for Python 2.5.
  520. - Unit test suite now passes for PyPy 1.9.
  521. - App instances now supports the with statement.
  522. This calls the new :meth:`~celery.Celery.close` method at exit, which
  523. cleans up after the app like closing pool connections.
  524. Note that this is only necessary when dynamically creating apps,
  525. e.g. for "temporary" apps.
  526. - Support for piping a subtask to a chain.
  527. For example:
  528. .. code-block:: python
  529. pipe = sometask.s() | othertask.s()
  530. new_pipe = mytask.s() | pipe
  531. Contributed by Steve Morin.
  532. - Fixed problem with group results on non-pickle serializers.
  533. Fix contributed by Steeve Morin.
  534. .. _version-3.0.8:
  535. 3.0.8
  536. =====
  537. :release-date: 2012-08-29 05:00 P.M BST
  538. - Now depends on Kombu 2.4.4
  539. - Fixed problem with amqplib and receiving larger message payloads
  540. (Issue #922).
  541. The problem would manifest itself as either the worker hanging,
  542. or occasionally a ``Framing error`` exception appearing.
  543. Users of the new ``pyamqp://`` transport must upgrade to
  544. :mod:`amqp` 0.9.3.
  545. - Beat: Fixed another timezone bug with interval and crontab schedules
  546. (Issue #943).
  547. - Beat: The schedule file is now automatically cleared if the timezone
  548. is changed.
  549. The schedule is also cleared when you upgrade to 3.0.8 from an earlier
  550. version, this to register the initial timezone info.
  551. - Events: The :event:`worker-heartbeat` event now include processed and active
  552. count fields.
  553. Contributed by Mher Movsisyan.
  554. - Fixed error with error email and new task classes (Issue #931).
  555. - ``BaseTask.__call__`` is no longer optimized away if it has been monkey
  556. patched.
  557. - Fixed shutdown issue when using gevent (Issue #911 & Issue #936).
  558. Fix contributed by Thomas Meson.
  559. .. _version-3.0.7:
  560. 3.0.7
  561. =====
  562. :release-date: 2012-08-24 05:00 P.M BST
  563. - Fixes several problems with periodic tasks and timezones (Issue #937).
  564. - Now depends on kombu 2.4.2
  565. - Redis: Fixes a race condition crash
  566. - Fixes an infinite loop that could happen when retrying establishing
  567. the broker connection.
  568. - Daemons now redirect standard file descriptors to :file:`/dev/null`
  569. Though by default the standard outs are also redirected
  570. to the logger instead, but you can disable this by changing
  571. the :setting:`CELERY_REDIRECT_STDOUTS` setting.
  572. - Fixes possible problems when eventlet/gevent is patched too late.
  573. - ``LoggingProxy`` no longer defines ``fileno()`` (Issue #928).
  574. - Results are now ignored for the chord unlock task.
  575. Fix contributed by Steeve Morin.
  576. - Cassandra backend now works if result expiry is disabled.
  577. Fix contributed by Steeve Morin.
  578. - The traceback object is now passed to signal handlers instead
  579. of the string representation.
  580. Fix contributed by Adam DePue.
  581. - Celery command: Extensions are now sorted by name.
  582. - A regression caused the :event:`task-failed` event to be sent
  583. with the exception object instead of its string representation.
  584. - The worker daemon would try to create the pid file before daemonizing
  585. to catch errors, but this file was not immediately released (Issue #923).
  586. - Fixes Jython compatibility.
  587. - ``billiard.forking_enable`` was called by all pools not just the
  588. processes pool, which would result in a useless warning if the billiard
  589. C extensions were not installed.
  590. .. _version-3.0.6:
  591. 3.0.6
  592. =====
  593. :release-date: 2012-08-17 11:00 P.M BST
  594. - Now depends on kombu 2.4.0
  595. - Now depends on billiard 2.7.3.12
  596. - Redis: Celery now tries to restore messages whenever there are no messages
  597. in the queue.
  598. - Crontab schedules now properly respects :setting:`CELERY_TIMEZONE` setting.
  599. It's important to note that crontab schedules uses UTC time by default
  600. unless this setting is set.
  601. Issue #904 and django-celery #150.
  602. - ``billiard.enable_forking`` is now only set by the processes pool.
  603. - The transport is now properly shown by :program:`celery report`
  604. (Issue #913).
  605. - The `--app` argument now works if the last part is a module name
  606. (Issue #921).
  607. - Fixed problem with unpickleable exceptions (billiard #12).
  608. - Adds ``task_name`` attribute to ``EagerResult`` which is always
  609. :const:`None` (Issue #907).
  610. - Old Task class in :mod:`celery.task` no longer accepts magic kwargs by
  611. default (Issue #918).
  612. A regression long ago disabled magic kwargs for these, and since
  613. no one has complained about it we don't have any incentive to fix it now.
  614. - The ``inspect reserved`` control command did not work properly.
  615. - Should now play better with static analyzation tools by explicitly
  616. specifying dynamically created attributes in the :mod:`celery` and
  617. :mod:`celery.task` modules.
  618. - Terminating a task now results in
  619. :exc:`~celery.exceptions.RevokedTaskError` instead of a ``WorkerLostError``.
  620. - ``AsyncResult.revoke`` now accepts ``terminate`` and ``signal`` arguments.
  621. - The :event:`task-revoked` event now includes new fields: ``terminated``,
  622. ``signum``, and ``expired``.
  623. - The argument to :class:`~celery.exceptions.TaskRevokedError` is now one
  624. of the reasons ``revoked``, ``expired`` or ``terminated``.
  625. - Old Task class does no longer use classmethods for push_request and
  626. pop_request (Issue #912).
  627. - ``GroupResult`` now supports the ``children`` attribute (Issue #916).
  628. - ``AsyncResult.collect`` now respects the ``intermediate`` argument
  629. (Issue #917).
  630. - Fixes example task in documentation (Issue #902).
  631. - Eventlet fixed so that the environment is patched as soon as possible.
  632. - eventlet: Now warns if celery related modules that depends on threads
  633. are imported before eventlet is patched.
  634. - Improved event and camera examples in the monitoring guide.
  635. - Disables celery command setuptools entrypoints if the command can't be
  636. loaded.
  637. - Fixed broken ``dump_request`` example in the tasks guide.
  638. .. _version-3.0.5:
  639. 3.0.5
  640. =====
  641. :release-date: 2012-08-01 04:00 P.M BST
  642. - Now depends on kombu 2.3.1 + billiard 2.7.3.11
  643. - Fixed a bug with the -B option (``cannot pickle thread.lock objects``)
  644. (Issue #894 + Issue #892, + django-celery #154).
  645. - The :control:`restart_pool` control command now requires the
  646. :setting:`CELERYD_POOL_RESTARTS` setting to be enabled
  647. This change was necessary as the multiprocessing event that the restart
  648. command depends on is responsible for creating many semaphores/file
  649. descriptors, resulting in problems in some environments.
  650. - ``chain.apply`` now passes args to the first task (Issue #889).
  651. - Documented previously secret options to the Django-Celery monitor
  652. in the monitoring userguide (Issue #396).
  653. - Old changelog are now organized in separate documents for each series,
  654. see :ref:`history`.
  655. .. _version-3.0.4:
  656. 3.0.4
  657. =====
  658. :release-date: 2012-07-26 07:00 P.M BST
  659. - Now depends on Kombu 2.3
  660. - New experimental standalone Celery monitor: Flower
  661. See :ref:`monitoring-flower` to read more about it!
  662. Contributed by Mher Movsisyan.
  663. - Now supports AMQP heartbeats if using the new ``pyamqp://`` transport.
  664. - The py-amqp transport requires the :mod:`amqp` library to be installed::
  665. $ pip install amqp
  666. - Then you need to set the transport URL prefix to ``pyamqp://``.
  667. - The default heartbeat value is 10 seconds, but this can be changed using
  668. the :setting:`BROKER_HEARTBEAT` setting::
  669. BROKER_HEARTBEAT = 5.0
  670. - If the broker heartbeat is set to 10 seconds, the heartbeats will be
  671. monitored every 5 seconds (double the hertbeat rate).
  672. See the :ref:`Kombu 2.3 changelog <kombu:version-2.3.0>` for more information.
  673. - Now supports RabbitMQ Consumer Cancel Notifications, using the ``pyamqp://``
  674. transport.
  675. This is essential when running RabbitMQ in a cluster.
  676. See the :ref:`Kombu 2.3 changelog <kombu:version-2.3.0>` for more information.
  677. - Delivery info is no longer passed directly through.
  678. It was discovered that the SQS transport adds objects that can't
  679. be pickled to the delivery info mapping, so we had to go back
  680. to using the whitelist again.
  681. Fixing this bug also means that the SQS transport is now working again.
  682. - The semaphore was not properly released when a task was revoked (Issue #877).
  683. This could lead to tasks being swallowed and not released until a worker
  684. restart.
  685. Thanks to Hynek Schlawack for debugging the issue.
  686. - Retrying a task now also forwards any linked tasks.
  687. This means that if a task is part of a chain (or linked in some other
  688. way) and that even if the task is retried, then the next task in the chain
  689. will be executed when the retry succeeds.
  690. - Chords: Now supports setting the interval and other keyword arguments
  691. to the chord unlock task.
  692. - The interval can now be set as part of the chord subtasks kwargs::
  693. chord(header)(body, interval=10.0)
  694. - In addition the chord unlock task now honors the Task.default_retry_delay
  695. option, used when none is specified, which also means that the default
  696. interval can also be changed using annotations:
  697. .. code-block:: python
  698. CELERY_ANNOTATIONS = {
  699. 'celery.chord_unlock': {
  700. 'default_retry_delay': 10.0,
  701. }
  702. }
  703. - New :meth:`@Celery.add_defaults` method can add new default configuration
  704. dicts to the applications configuration.
  705. For example::
  706. config = {'FOO': 10}
  707. celery.add_defaults(config)
  708. is the same as ``celery.conf.update(config)`` except that data will not be
  709. copied, and that it will not be pickled when the worker spawns child
  710. processes.
  711. In addition the method accepts a callable::
  712. def initialize_config():
  713. # insert heavy stuff that can't be done at import time here.
  714. celery.add_defaults(initialize_config)
  715. which means the same as the above except that it will not happen
  716. until the celery configuration is actually used.
  717. As an example, Celery can lazily use the configuration of a Flask app::
  718. flask_app = Flask()
  719. celery = Celery()
  720. celery.add_defaults(lambda: flask_app.config)
  721. - Revoked tasks were not marked as revoked in the result backend (Issue #871).
  722. Fix contributed by Hynek Schlawack.
  723. - Eventloop now properly handles the case when the epoll poller object
  724. has been closed (Issue #882).
  725. - Fixed syntax error in ``funtests/test_leak.py``
  726. Fix contributed by Catalin Iacob.
  727. - group/chunks: Now accepts empty task list (Issue #873).
  728. - New method names:
  729. - ``Celery.default_connection()`` ➠ :meth:`~@Celery.connection_or_acquire`.
  730. - ``Celery.default_producer()`` ➠ :meth:`~@Celery.producer_or_acquire`.
  731. The old names still work for backward compatibility.
  732. .. _version-3.0.3:
  733. 3.0.3
  734. =====
  735. :release-date: 2012-07-20 09:17 P.M BST
  736. :by: Ask Solem
  737. - amqplib passes the channel object as part of the delivery_info
  738. and it's not pickleable, so we now remove it.
  739. .. _version-3.0.2:
  740. 3.0.2
  741. =====
  742. :release-date: 2012-07-20 04:00 P.M BST
  743. :by: Ask Solem
  744. - A bug caused the following task options to not take defaults from the
  745. configuration (Issue #867 + Issue #858)
  746. The following settings were affected:
  747. - :setting:`CELERY_IGNORE_RESULT`
  748. - :setting:`CELERYD_SEND_TASK_ERROR_EMAILS`
  749. - :setting:`CELERY_TRACK_STARTED`
  750. - :setting:`CElERY_STORE_ERRORS_EVEN_IF_IGNORED`
  751. Fix contributed by John Watson.
  752. - Task Request: ``delivery_info`` is now passed through as-is (Issue #807).
  753. - The eta argument now supports datetime's with a timezone set (Issue #855).
  754. - The worker's banner displayed the autoscale settings in the wrong order
  755. (Issue #859).
  756. - Extension commands are now loaded after concurrency is set up
  757. so that they don't interfere with e.g. eventlet patching.
  758. - Fixed bug in the threaded pool (Issue #863)
  759. - The task failure handler mixed up the fields in :func:`sys.exc_info`.
  760. Fix contributed by Rinat Shigapov.
  761. - Fixed typos and wording in the docs.
  762. Fix contributed by Paul McMillan
  763. - New setting: :setting:`CELERY_WORKER_DIRECT`
  764. If enabled each worker will consume from their own dedicated queue
  765. which can be used to route tasks to specific workers.
  766. - Fixed several edge case bugs in the add consumer remote control command.
  767. - :mod:`~celery.contrib.migrate`: Can now filter and move tasks to specific
  768. workers if :setting:`CELERY_WORKER_DIRECT` is enabled.
  769. Among other improvements, the following functions have been added:
  770. * ``move_direct(filterfun, **opts)``
  771. * ``move_direct_by_id(task_id, worker_hostname, **opts)``
  772. * ``move_direct_by_idmap({task_id: worker_hostname, ...}, **opts)``
  773. * ``move_direct_by_taskmap({task_name: worker_hostname, ...}, **opts)``
  774. - :meth:`~celery.Celery.default_connection` now accepts a pool argument that
  775. if set to false causes a new connection to be created instead of acquiring
  776. one from the pool.
  777. - New signal: :signal:`celeryd_after_setup`.
  778. - Default loader now keeps lowercase attributes from the configuration module.
  779. .. _version-3.0.1:
  780. 3.0.1
  781. =====
  782. :release-date: 2012-07-10 06:00 P.M BST
  783. :by: Ask Solem
  784. - Now depends on kombu 2.2.5
  785. - inspect now supports limit argument::
  786. myapp.control.inspect(limit=1).ping()
  787. - Beat: now works with timezone aware datetime's.
  788. - Task classes inheriting ``from celery import Task``
  789. mistakingly enabled ``accept_magic_kwargs``.
  790. - Fixed bug in ``inspect scheduled`` (Issue #829).
  791. - Beat: Now resets the schedule to upgrade to UTC.
  792. - The :program:`celery worker` command now works with eventlet/gevent.
  793. Previously it would not patch the environment early enough.
  794. - The :program:`celery` command now supports extension commands
  795. using setuptools entry-points.
  796. Libraries can add additional commands to the :program:`celery`
  797. command by adding an entry-point like::
  798. setup(
  799. entry_points=[
  800. 'celery.commands': [
  801. 'foo = my.module:Command',
  802. ],
  803. ],
  804. ...)
  805. The command must then support the interface of
  806. :class:`celery.bin.base.Command`.
  807. - contrib.migrate: New utilities to move tasks from one queue to another.
  808. - :func:`~celery.contrib.migrate.move_tasks`
  809. - :func:`~celery.contrib.migrate.move_task_by_id`
  810. - The :event:`task-sent` event now contains ``exchange`` and ``routing_key``
  811. fields.
  812. - Fixes bug with installing on Python 3.
  813. Fix contributed by Jed Smith.
  814. .. _version-3.0.0:
  815. 3.0.0 (Chiastic Slide)
  816. ======================
  817. :release-date: 2012-07-07 01:30 P.M BST
  818. :by: Ask Solem
  819. See :ref:`whatsnew-3.0`.