changelog-2.4.rst 13 KB

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