changelog-2.4.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. .. _changelog-2.4:
  2. ===============================
  3. Change history for Celery 2.4
  4. ===============================
  5. .. contents::
  6. :local:
  7. .. _version-2.4.5:
  8. 2.4.5
  9. =====
  10. :release-date: 2011-12-02 05:00 P.M GMT
  11. :release-by: Ask Solem
  12. * Periodic task interval schedules were accidentally rounded down,
  13. resulting in some periodic tasks being executed early.
  14. * Logging of humanized times in the beat log is now more detailed.
  15. * New :ref:`brokers` section in the Getting Started part of the Documentation
  16. This replaces the old "Other queues" tutorial, and adds
  17. documentation for MongoDB, Beanstalk and CouchDB.
  18. .. _version-2.4.4:
  19. 2.4.4
  20. =====
  21. :release-date: 2011-11-25 04:00 P.M GMT
  22. :release-by: Ask Solem
  23. .. _v244-security-fixes:
  24. Security Fixes
  25. --------------
  26. * [Security: `CELERYSA-0001`_] Daemons would set effective id's rather than
  27. real id's when the :option:`--uid`/:option:`--gid` arguments to
  28. :program:`celery multi`, :program:`celeryd_detach`,
  29. :program:`celery beat` and :program:`celery events` were used.
  30. This means privileges weren't properly dropped, and that it would
  31. be possible to regain supervisor privileges later.
  32. .. _`CELERYSA-0001`:
  33. http://github.com/celery/celery/tree/master/docs/sec/CELERYSA-0001.txt
  34. .. _v244-fixes:
  35. Fixes
  36. -----
  37. * Processes pool: Fixed rare deadlock at shutdown (Issue #523).
  38. Fix contributed by Ionel Maries Christian.
  39. * Webhook tasks issued the wrong HTTP POST headers (Issue #515).
  40. The *Content-Type* header has been changed from
  41. ``application/json`` ⇒ ``application/x-www-form-urlencoded``,
  42. and adds a proper *Content-Length* header.
  43. Fix contributed by Mitar.
  44. * Daemonization tutorial: Adds a configuration example using Django and
  45. virtualenv together (Issue #505).
  46. Contributed by Juan Ignacio Catalano.
  47. * generic init scripts now automatically creates log and pid file
  48. directories (Issue #545).
  49. Contributed by Chris Streeter.
  50. .. _version-2.4.3:
  51. 2.4.3
  52. =====
  53. :release-date: 2011-11-22 06:00 P.M GMT
  54. :release-by: Ask Solem
  55. * Fixes module import typo in `celeryctl` (Issue #538).
  56. Fix contributed by Chris Streeter.
  57. .. _version-2.4.2:
  58. 2.4.2
  59. =====
  60. :release-date: 2011-11-14 12:00 P.M GMT
  61. :release-by: Ask Solem
  62. * Program module no longer uses relative imports so that it is
  63. possible to do ``python -m celery.bin.name``.
  64. .. _version-2.4.1:
  65. 2.4.1
  66. =====
  67. :release-date: 2011-11-07 06:00 P.M GMT
  68. :release-by: Ask Solem
  69. * celeryctl inspect commands was missing output.
  70. * processes pool: Decrease polling interval for less idle CPU usage.
  71. * processes pool: MaybeEncodingError was not wrapped in ExceptionInfo
  72. (Issue #524).
  73. * worker: would silence errors occuring after task consumer started.
  74. * logging: Fixed a bug where unicode in stdout redirected log messages
  75. couldn't be written (Issue #522).
  76. .. _version-2.4.0:
  77. 2.4.0
  78. =====
  79. :release-date: 2011-11-04 04:00 P.M GMT
  80. :release-by: Ask Solem
  81. .. _v240-important:
  82. Important Notes
  83. ---------------
  84. * Now supports Python 3.
  85. * Fixed deadlock in worker process handling (Issue #496).
  86. A deadlock could occur after spawning new child processes because
  87. the logging library's mutex was not properly reset after fork.
  88. The symptoms of this bug affecting would be that the worker simply
  89. stops processing tasks, as none of the workers child processes
  90. are functioning. There was a greater chance of this bug occurring
  91. with ``maxtasksperchild`` or a time-limit enabled.
  92. This is a workaround for http://bugs.python.org/issue6721#msg140215.
  93. Be aware that while this fixes the logging library lock,
  94. there could still be other locks initialized in the parent
  95. process, introduced by custom code.
  96. Fix contributed by Harm Verhagen.
  97. * AMQP Result backend: Now expires results by default.
  98. The default expiration value is now taken from the
  99. :setting:`CELERY_TASK_RESULT_EXPIRES` setting.
  100. The old :setting:`CELERY_AMQP_TASK_RESULT_EXPIRES` setting has been
  101. deprecated and will be removed in version 4.0.
  102. Note that this means that the result backend requires RabbitMQ 2.1.0 or
  103. higher, and that you have to disable expiration if you are running
  104. with an older version. You can do so by disabling the
  105. :setting:`CELERY_TASK_RESULT_EXPIRES` setting::
  106. CELERY_TASK_RESULT_EXPIRES = None
  107. * Eventlet: Fixed problem with shutdown (Issue #457).
  108. * Broker transports can be now be specified using URLs
  109. The broker can now be specified as an URL instead.
  110. This URL must have the format::
  111. transport://user:password@hostname:port/virtual_host
  112. for example the default broker is written as::
  113. amqp://guest:guest@localhost:5672//
  114. The scheme is required, so that the host is identified
  115. as an URL and not just a host name.
  116. User, password, port and virtual_host are optional and
  117. defaults to the particular transports default value.
  118. .. note::
  119. Note that the path component (virtual_host) always starts with a
  120. forward-slash. This is necessary to distinguish between the virtual
  121. host ``''`` (empty) and ``'/'``, which are both acceptable virtual
  122. host names.
  123. A virtual host of ``'/'`` becomes:
  124. amqp://guest:guest@localhost:5672//
  125. and a virtual host of ``''`` (empty) becomes::
  126. amqp://guest:guest@localhost:5672/
  127. So the leading slash in the path component is **always required**.
  128. In addition the :setting:`BROKER_URL` setting has been added as an alias
  129. to ``BROKER_HOST``. Any broker setting specified in both the URL and in
  130. the configuration will be ignored, if a setting is not provided in the URL
  131. then the value from the configuration will be used as default.
  132. Also, programs now support the :option:`-b|--broker` option to specify
  133. a broker URL on the command-line:
  134. .. code-block:: bash
  135. $ celery worker -b redis://localhost
  136. $ celery inspect -b amqp://guest:guest@localhost//e
  137. The environment variable :envvar:`CELERY_BROKER_URL` can also be used to
  138. easily override the default broker used.
  139. * The deprecated :func:`celery.loaders.setup_loader` function has been removed.
  140. * The :setting:`CELERY_TASK_ERROR_WHITELIST` setting has been replaced
  141. by a more flexible approach (Issue #447).
  142. The error mail sending logic is now available as ``Task.ErrorMail``,
  143. with the implementation (for reference) in :mod:`celery.utils.mail`.
  144. The error mail class can be sub-classed to gain complete control
  145. of when error messages are sent, thus removing the need for a separate
  146. white-list setting.
  147. The :setting:`CELERY_TASK_ERROR_WHITELIST` setting has been deprecated,
  148. and will be removed completely in version 4.0.
  149. * Additional Deprecations
  150. The following functions has been deprecated and is scheduled for removal in
  151. version 4.0:
  152. ===================================== ===================================
  153. **Old function** **Alternative**
  154. ===================================== ===================================
  155. `celery.loaders.current_loader` `celery.current_app.loader`
  156. `celery.loaders.load_settings` `celery.current_app.conf`
  157. `celery.execute.apply` `Task.apply`
  158. `celery.execute.apply_async` `Task.apply_async`
  159. `celery.execute.delay_task` `celery.execute.send_task`
  160. ===================================== ===================================
  161. The following settings has been deprecated and is scheduled for removal
  162. in version 4.0:
  163. ===================================== ===================================
  164. **Old setting** **Alternative**
  165. ===================================== ===================================
  166. `CELERYD_LOG_LEVEL` ``celery worker --loglevel=``
  167. `CELERYD_LOG_FILE` ``celery worker --logfile=``
  168. `CELERYBEAT_LOG_LEVEL` ``celery beat --loglevel=``
  169. `CELERYBEAT_LOG_FILE` ``celery beat --logfile=``
  170. `CELERYMON_LOG_LEVEL` ``celerymon --loglevel=``
  171. `CELERYMON_LOG_FILE` ``celerymon --logfile=``
  172. ===================================== ===================================
  173. .. _v240-news:
  174. News
  175. ----
  176. * No longer depends on :mod:`pyparsing`.
  177. * Now depends on Kombu 1.4.3.
  178. * CELERY_IMPORTS can now be a scalar value (Issue #485).
  179. It is too easy to forget to add the comma after the sole element of a
  180. tuple, and this is something that often affects newcomers.
  181. The docs should probably use a list in examples, as using a tuple
  182. for this doesn't even make sense. Nonetheless, there are many
  183. tutorials out there using a tuple, and this change should be a help
  184. to new users.
  185. Suggested by jsaxon-cars.
  186. * Fixed a memory leak when using the thread pool (Issue #486).
  187. Contributed by Kornelijus Survila.
  188. * The statedb was not saved at exit.
  189. This has now been fixed and it should again remember previously
  190. revoked tasks when a ``--statedb`` is enabled.
  191. * Adds :setting:`EMAIL_USE_TLS` to enable secure SMTP connections
  192. (Issue #418).
  193. Contributed by Stefan Kjartansson.
  194. * Now handles missing fields in task messages as documented in the message
  195. format documentation.
  196. * Missing required field throws :exc:`~@InvalidTaskError`
  197. * Missing args/kwargs is assumed empty.
  198. Contributed by Chris Chamberlin.
  199. * Fixed race condition in celery.events.state (celerymon/celeryev)
  200. where task info would be removed while iterating over it (Issue #501).
  201. * The Cache, Cassandra, MongoDB, Redis and Tyrant backends now respects
  202. the :setting:`CELERY_RESULT_SERIALIZER` setting (Issue #435).
  203. This means that only the database (django/sqlalchemy) backends
  204. currently does not support using custom serializers.
  205. Contributed by Steeve Morin
  206. * Logging calls no longer manually formats messages, but delegates
  207. that to the logging system, so tools like Sentry can easier
  208. work with the messages (Issue #445).
  209. Contributed by Chris Adams.
  210. * ``multi`` now supports a ``stop_verify`` command to wait for
  211. processes to shutdown.
  212. * Cache backend did not work if the cache key was unicode (Issue #504).
  213. Fix contributed by Neil Chintomby.
  214. * New setting :setting:`CELERY_RESULT_DB_SHORT_LIVED_SESSIONS` added,
  215. which if enabled will disable the caching of SQLAlchemy sessions
  216. (Issue #449).
  217. Contributed by Leo Dirac.
  218. * All result backends now implements ``__reduce__`` so that they can
  219. be pickled (Issue #441).
  220. Fix contributed by Remy Noel
  221. * multi did not work on Windows (Issue #472).
  222. * New-style ``CELERY_REDIS_*`` settings now takes precedence over
  223. the old ``REDIS_*`` configuration keys (Issue #508).
  224. Fix contributed by Joshua Ginsberg
  225. * Generic beat init script no longer sets `bash -e` (Issue #510).
  226. Fix contributed by Roger Hu.
  227. * Documented that Chords do not work well with redis-server versions
  228. before 2.2.
  229. Contributed by Dan McGee.
  230. * The :setting:`CELERYBEAT_MAX_LOOP_INTERVAL` setting was not respected.
  231. * ``inspect.registered_tasks`` renamed to ``inspect.registered`` for naming
  232. consistency.
  233. The previous name is still available as an alias.
  234. Contributed by Mher Movsisyan
  235. * Worker logged the string representation of args and kwargs
  236. without safe guards (Issue #480).
  237. * RHEL init script: Changed worker startup priority.
  238. The default start / stop priorities for MySQL on RHEL are
  239. # chkconfig: - 64 36
  240. Therefore, if Celery is using a database as a broker / message store, it
  241. should be started after the database is up and running, otherwise errors
  242. will ensue. This commit changes the priority in the init script to
  243. # chkconfig: - 85 15
  244. which are the default recommended settings for 3-rd party applications
  245. and assure that Celery will be started after the database service & shut
  246. down before it terminates.
  247. Contributed by Yury V. Zaytsev.
  248. * KeyValueStoreBackend.get_many did not respect the ``timeout`` argument
  249. (Issue #512).
  250. * beat/events's --workdir option did not chdir before after
  251. configuration was attempted (Issue #506).
  252. * After deprecating 2.4 support we can now name modules correctly, since we
  253. can take use of absolute imports.
  254. Therefore the following internal modules have been renamed:
  255. celery.concurrency.evlet -> celery.concurrency.eventlet
  256. celery.concurrency.evg -> celery.concurrency.gevent
  257. * AUTHORS file is now sorted alphabetically.
  258. Also, as you may have noticed the contributors of new features/fixes are
  259. now mentioned in the Changelog.