Changelog 41 KB

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