Changelog 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. ==============
  2. Change history
  3. ==============
  4. 0.8.0 [2009-xx-xx xx:xx x.M CET]
  5. --------------------------------
  6. **BACKWARD INCOMPATIBLE CHANGES**
  7. * Add traceback to result value on failure.
  8. **NOTE** If you use the database backend you have to re-create the
  9. database table ``celery_taskmeta``.
  10. Contact the mailinglist or IRC channel listed in README for help
  11. doing this.
  12. * Celery now depends on ``carrot`` version 0.5.2.
  13. **IMPORTANT CHANGES**
  14. * Celery can now be used in pure Python (outside of a Django project).
  15. This means celery is no longer Django specific.
  16. For more information see the FAQ entry
  17. `Can I use celery without Django?`_.
  18. .. _`Can I use celery without Django?`:
  19. http://ask.github.com/celery/faq.html#can-i-use-celery-without-django
  20. * Celery now supports task retries.
  21. See `Cookbook: Retrying Tasks`_ for more information.
  22. .. _`Cookbook: Retrying Tasks`:
  23. http://ask.github.com/celery/cookbook/task-retries.html
  24. * We now have an AMQP result store backend.
  25. It uses messages to publish task return value and status. And it's
  26. incredibly fast!
  27. See http://github.com/ask/celery/issues/closed#issue/6 for more info!
  28. * AMQP QoS (prefetch count) implemented:
  29. This to not receive more messages than we can handle.
  30. * Now redirects stdout/stderr to the celeryd logfile when detached
  31. * Now uses ``inspect.getargspec`` to only pass default arguments
  32. the task supports.
  33. * Add Task.on_success, .on_retry, .on_failure handlers
  34. See :meth:`celery.task.base.Task.on_success`,
  35. :meth:`celery.task.base.Task.on_retry`,
  36. :meth:`celery.task.base.Task.on_failure`,
  37. * ``celery.utils.gen_unique_id``: Workaround for
  38. http://bugs.python.org/issue4607
  39. * You can now customize what happens at worker start, at process init, etc
  40. by creating your own loaders. (see :mod:`celery.loaders.default`,
  41. :mod:`celery.loaders.djangoapp`, :mod:`celery.loaders`.)
  42. * Support for multiple AMQP exchanges and queues.
  43. This feature misses documentation and tests, so anyone interested
  44. is encouraged to improve this situation.
  45. * celeryd now survives a restart of the AMQP server!
  46. Automatically re-establish AMQP broker connection if it's lost.
  47. New settings:
  48. * AMQP_CONNECTION_RETRY
  49. Set to ``True`` to enable connection retries.
  50. * AMQP_CONNECTION_MAX_RETRIES.
  51. Maximum number of restarts before we give up. Default: ``100``.
  52. **NEWS**
  53. * New signals introduced: ``task_prerun`` and ``task_postrun``, see
  54. :mod:`celery.signals` for more information.
  55. * ``TaskSetResult.join`` caused ``TypeError`` when ``timeout=None``.
  56. Thanks Jerzy Kozera. Closes #31
  57. * ``views.apply`` should return ``HttpResponse`` instance.
  58. Thanks to Jerzy Kozera. Closes #32
  59. * ``PeriodicTask``: Save conversion of ``run_every`` from ``int``
  60. to ``timedelta`` to the class attribute instead of on the instance.
  61. * Exceptions has been moved to ``celery.exceptions``, but are still
  62. available in the previous module.
  63. * jail() refactored into :class:`celery.execute.ExecuteWrapper`.
  64. * ``views.apply`` now correctly sets mimetype to "application/json"
  65. * ``views.task_status`` now returns exception if status is RETRY
  66. * ``views.task_status`` now returns traceback if status is "FAILURE"
  67. or "RETRY"
  68. * Documented default task arguments.
  69. * Add a sensible __repr__ to ExceptionInfo for easier debugging
  70. * Fix documentation typo ``.. import map`` -> ``.. import dmap``.
  71. Thanks mikedizon
  72. 0.6.0 [2009-08-07 06:54 A.M CET]
  73. --------------------------------
  74. **IMPORTANT CHANGES**
  75. * Fixed a bug where tasks raising unpickleable exceptions crashed pool
  76. workers. So if you've had pool workers mysteriously dissapearing, or
  77. problems with celeryd stopping working, this has been fixed in this
  78. version.
  79. * Fixed a race condition with periodic tasks.
  80. * The task pool is now supervised, so if a pool worker crashes,
  81. goes away or stops responding, it is automatically replaced with
  82. a new one.
  83. * Task.name is now automatically generated out of class module+name, e.g.
  84. ``"djangotwitter.tasks.UpdateStatusesTask"``. Very convenient. No idea why
  85. we didn't do this before. Some documentation is updated to not manually
  86. specify a task name.
  87. **NEWS**
  88. * Tested with Django 1.1
  89. * New Tutorial: Creating a click counter using carrot and celery
  90. * Database entries for periodic tasks are now created at ``celeryd``
  91. startup instead of for each check (which has been a forgotten TODO/XXX
  92. in the code for a long time)
  93. * New settings variable: ``CELERY_TASK_RESULT_EXPIRES``
  94. Time (in seconds, or a `datetime.timedelta` object) for when after
  95. stored task results are deleted. For the moment this only works for the
  96. database backend.
  97. * ``celeryd`` now emits a debug log message for which periodic tasks
  98. has been launched.
  99. * The periodic task table is now locked for reading while getting
  100. periodic task status. (MySQL only so far, seeking patches for other
  101. engines)
  102. * A lot more debugging information is now available by turning on the
  103. ``DEBUG`` loglevel (``--loglevel=DEBUG``).
  104. * Functions/methods with a timeout argument now works correctly.
  105. * New: ``celery.strategy.even_time_distribution``:
  106. With an iterator yielding task args, kwargs tuples, evenly distribute
  107. the processing of its tasks throughout the time window available.
  108. * Log message ``Unknown task ignored...`` now has loglevel ``ERROR``
  109. * Log message ``"Got task from broker"`` is now emitted for all tasks, even if
  110. the task has an ETA (estimated time of arrival). Also the message now
  111. includes the ETA for the task (if any).
  112. * Acknowledgement now happens in the pool callback. Can't do ack in the job
  113. target, as it's not pickleable (can't share AMQP connection, etc)).
  114. * Added note about .delay hanging in README
  115. * Tests now passing in Django 1.1
  116. * Fixed discovery to make sure app is in INSTALLED_APPS
  117. * Previously overrided pool behaviour (process reap, wait until pool worker
  118. available, etc.) is now handled by ``multiprocessing.Pool`` itself.
  119. * Convert statistics data to unicode for use as kwargs. Thanks Lucy!
  120. 0.4.1 [2009-07-02 01:42 P.M CET]
  121. --------------------------------
  122. * Fixed a bug with parsing the message options (``mandatory``,
  123. ``routing_key``, ``priority``, ``immediate``)
  124. 0.4.0 [2009-07-01 07:29 P.M CET]
  125. --------------------------------
  126. * Adds eager execution. ``celery.execute.apply``|``Task.apply`` executes the
  127. function blocking until the task is done, for API compatiblity it
  128. returns an ``celery.result.EagerResult`` instance. You can configure
  129. celery to always run tasks locally by setting the
  130. ``CELERY_ALWAYS_EAGER`` setting to ``True``.
  131. * Now depends on ``anyjson``.
  132. * 99% coverage using python ``coverage`` 3.0.
  133. 0.3.20 [2009-06-25 08:42 P.M CET]
  134. ---------------------------------
  135. * New arguments to ``apply_async`` (the advanced version of
  136. ``delay_task``), ``countdown`` and ``eta``;
  137. >>> # Run 10 seconds into the future.
  138. >>> res = apply_async(MyTask, countdown=10);
  139. >>> # Run 1 day from now
  140. >>> res = apply_async(MyTask, eta=datetime.now() +
  141. ... timedelta(days=1)
  142. * Now unlinks the pidfile if it's stale.
  143. * Lots of more tests.
  144. * Now compatible with carrot >= 0.5.0.
  145. * **IMPORTANT** The ``subtask_ids`` attribute on the ``TaskSetResult``
  146. instance has been removed. To get this information instead use:
  147. >>> subtask_ids = [subtask.task_id for subtask in ts_res.subtasks]
  148. * ``Taskset.run()`` now respects extra message options from the task class.
  149. * Task: Add attribute ``ignore_result``: Don't store the status and
  150. return value. This means you can't use the
  151. ``celery.result.AsyncResult`` to check if the task is
  152. done, or get its return value. Only use if you need the performance
  153. and is able live without these features. Any exceptions raised will
  154. store the return value/status as usual.
  155. * Task: Add attribute ``disable_error_emails`` to disable sending error
  156. emails for that task.
  157. * Should now work on Windows (although running in the background won't
  158. work, so using the ``--detach`` argument results in an exception
  159. being raised.)
  160. * Added support for statistics for profiling and monitoring.
  161. To start sending statistics start ``celeryd`` with the
  162. ``--statistics`` option. Then after a while you can dump the results
  163. by running ``python manage.py celerystats``. See
  164. ``celery.monitoring`` for more information.
  165. * The celery daemon can now be supervised (i.e it is automatically
  166. restarted if it crashes). To use this start celeryd with the
  167. ``--supervised`` option (or alternatively ``-S``).
  168. * views.apply: View applying a task. Example::
  169. http://e.com/celery/apply/task_name/arg1/arg2//?kwarg1=a&kwarg2=b
  170. **NOTE** Use with caution, preferably not make this publicly
  171. accessible without ensuring your code is safe!
  172. * Refactored ``celery.task``. It's now split into three modules:
  173. * celery.task
  174. Contains ``apply_async``, ``delay_task``, ``discard_all``, and task
  175. shortcuts, plus imports objects from ``celery.task.base`` and
  176. ``celery.task.builtins``
  177. * celery.task.base
  178. Contains task base classes: ``Task``, ``PeriodicTask``,
  179. ``TaskSet``, ``AsynchronousMapTask``, ``ExecuteRemoteTask``.
  180. * celery.task.builtins
  181. Built-in tasks: ``PingTask``, ``DeleteExpiredTaskMetaTask``.
  182. 0.3.7 [2008-06-16 11:41 P.M CET]
  183. --------------------------------
  184. * **IMPORTANT** Now uses AMQP's ``basic.consume`` instead of
  185. ``basic.get``. This means we're no longer polling the broker for
  186. new messages.
  187. * **IMPORTANT** Default concurrency limit is now set to the number of CPUs
  188. available on the system.
  189. * **IMPORTANT** ``tasks.register``: Renamed ``task_name`` argument to
  190. ``name``, so
  191. >>> tasks.register(func, task_name="mytask")
  192. has to be replaced with:
  193. >>> tasks.register(func, name="mytask")
  194. * The daemon now correctly runs if the pidlock is stale.
  195. * Now compatible with carrot 0.4.5
  196. * Default AMQP connnection timeout is now 4 seconds.
  197. * ``AsyncResult.read()`` was always returning ``True``.
  198. * Only use README as long_description if the file exists so easy_install
  199. doesn't break.
  200. * ``celery.view``: JSON responses now properly set its mime-type.
  201. * ``apply_async`` now has a ``connection`` keyword argument so you
  202. can re-use the same AMQP connection if you want to execute
  203. more than one task.
  204. * Handle failures in task_status view such that it won't throw 500s.
  205. * Fixed typo ``AMQP_SERVER`` in documentation to ``AMQP_HOST``.
  206. * Worker exception e-mails sent to admins now works properly.
  207. * No longer depends on ``django``, so installing ``celery`` won't affect
  208. the preferred Django version installed.
  209. * Now works with PostgreSQL (psycopg2) again by registering the
  210. ``PickledObject`` field.
  211. * ``celeryd``: Added ``--detach`` option as an alias to ``--daemon``, and
  212. it's the term used in the documentation from now on.
  213. * Make sure the pool and periodic task worker thread is terminated
  214. properly at exit. (So ``Ctrl-C`` works again).
  215. * Now depends on ``python-daemon``.
  216. * Removed dependency to ``simplejson``
  217. * Cache Backend: Re-establishes connection for every task process
  218. if the Django cache backend is memcached/libmemcached.
  219. * Tyrant Backend: Now re-establishes the connection for every task
  220. executed.
  221. 0.3.3 [2009-06-08 01:07 P.M CET]
  222. --------------------------------
  223. * The ``PeriodicWorkController`` now sleeps for 1 second between checking
  224. for periodic tasks to execute.
  225. 0.3.2 [2009-06-08 01:07 P.M CET]
  226. --------------------------------
  227. * celeryd: Added option ``--discard``: Discard (delete!) all waiting
  228. messages in the queue.
  229. * celeryd: The ``--wakeup-after`` option was not handled as a float.
  230. 0.3.1 [2009-06-08 01:07 P.M CET]
  231. --------------------------------
  232. * The `PeriodicTask`` worker is now running in its own thread instead
  233. of blocking the ``TaskController`` loop.
  234. * Default ``QUEUE_WAKEUP_AFTER`` has been lowered to ``0.1`` (was ``0.3``)
  235. 0.3.0 [2009-06-08 12:41 P.M CET]
  236. --------------------------------
  237. **NOTE** This is a development version, for the stable release, please
  238. see versions 0.2.x.
  239. **VERY IMPORTANT:** Pickle is now the encoder used for serializing task
  240. arguments, so be sure to flush your task queue before you upgrade.
  241. * **IMPORTANT** TaskSet.run() now returns a celery.result.TaskSetResult
  242. instance, which lets you inspect the status and return values of a
  243. taskset as it was a single entity.
  244. * **IMPORTANT** Celery now depends on carrot >= 0.4.1.
  245. * The celery daemon now sends task errors to the registered admin e-mails.
  246. To turn off this feature, set ``SEND_CELERY_TASK_ERROR_EMAILS`` to
  247. ``False`` in your ``settings.py``. Thanks to Grégoire Cachet.
  248. * You can now run the celery daemon by using ``manage.py``::
  249. $ python manage.py celeryd
  250. Thanks to Grégoire Cachet.
  251. * Added support for message priorities, topic exchanges, custom routing
  252. keys for tasks. This means we have introduced
  253. ``celery.task.apply_async``, a new way of executing tasks.
  254. You can use ``celery.task.delay`` and ``celery.Task.delay`` like usual, but
  255. if you want greater control over the message sent, you want
  256. ``celery.task.apply_async`` and ``celery.Task.apply_async``.
  257. This also means the AMQP configuration has changed. Some settings has
  258. been renamed, while others are new::
  259. CELERY_AMQP_EXCHANGE
  260. CELERY_AMQP_PUBLISHER_ROUTING_KEY
  261. CELERY_AMQP_CONSUMER_ROUTING_KEY
  262. CELERY_AMQP_CONSUMER_QUEUE
  263. CELERY_AMQP_EXCHANGE_TYPE
  264. See the entry `Can I send some tasks to only some servers?`_ in the
  265. `FAQ`_ for more information.
  266. .. _`Can I send some tasks to only some servers?`:
  267. http://bit.ly/celery_AMQP_routing
  268. .. _`FAQ`: http://ask.github.com/celery/faq.html
  269. * Task errors are now logged using loglevel ``ERROR`` instead of ``INFO``,
  270. and backtraces are dumped. Thanks to Grégoire Cachet.
  271. * Make every new worker process re-establish it's Django DB connection,
  272. this solving the "MySQL connection died?" exceptions.
  273. Thanks to Vitaly Babiy and Jirka Vejrazka.
  274. * **IMOPORTANT** Now using pickle to encode task arguments. This means you
  275. now can pass complex python objects to tasks as arguments.
  276. * Removed dependency to ``yadayada``.
  277. * Added a FAQ, see ``docs/faq.rst``.
  278. * Now converts any unicode keys in task ``kwargs`` to regular strings.
  279. Thanks Vitaly Babiy.
  280. * Renamed the ``TaskDaemon`` to ``WorkController``.
  281. * ``celery.datastructures.TaskProcessQueue`` is now renamed to
  282. ``celery.pool.TaskPool``.
  283. * The pool algorithm has been refactored for greater performance and
  284. stability.
  285. 0.2.0 [2009-05-20 05:14 P.M CET]
  286. --------------------------------
  287. * Final release of 0.2.0
  288. * Compatible with carrot version 0.4.0.
  289. * Fixes some syntax errors related to fetching results
  290. from the database backend.
  291. 0.2.0-pre3 [2009-05-20 05:14 P.M CET]
  292. -------------------------------------
  293. * *Internal release*. Improved handling of unpickled exceptions,
  294. ``get_result`` now tries to recreate something looking like the
  295. original exception.
  296. 0.2.0-pre2 [2009-05-20 01:56 P.M CET]
  297. -------------------------------------
  298. * Now handles unpickleable exceptions (like the dynimically generated
  299. subclasses of ``django.core.exception.MultipleObjectsReturned``).
  300. 0.2.0-pre1 [2009-05-20 12:33 P.M CET]
  301. -------------------------------------
  302. * It's getting quite stable, with a lot of new features, so bump
  303. version to 0.2. This is a pre-release.
  304. * ``celery.task.mark_as_read()`` and ``celery.task.mark_as_failure()`` has
  305. been removed. Use ``celery.backends.default_backend.mark_as_read()``,
  306. and ``celery.backends.default_backend.mark_as_failure()`` instead.
  307. 0.1.15 [2009-05-19 04:13 P.M CET]
  308. ---------------------------------
  309. * The celery daemon was leaking AMQP connections, this should be fixed,
  310. if you have any problems with too many files open (like ``emfile``
  311. errors in ``rabbit.log``, please contact us!
  312. 0.1.14 [2009-05-19 01:08 P.M CET]
  313. ---------------------------------
  314. * Fixed a syntax error in the ``TaskSet`` class. (No such variable
  315. ``TimeOutError``).
  316. 0.1.13 [2009-05-19 12:36 P.M CET]
  317. ---------------------------------
  318. * Forgot to add ``yadayada`` to install requirements.
  319. * Now deletes all expired task results, not just those marked as done.
  320. * Able to load the Tokyo Tyrant backend class without django
  321. configuration, can specify tyrant settings directly in the class
  322. constructor.
  323. * Improved API documentation
  324. * Now using the Sphinx documentation system, you can build
  325. the html documentation by doing ::
  326. $ cd docs
  327. $ make html
  328. and the result will be in ``docs/.build/html``.
  329. 0.1.12 [2009-05-18 04:38 P.M CET]
  330. ---------------------------------
  331. * ``delay_task()`` etc. now returns ``celery.task.AsyncResult`` object,
  332. which lets you check the result and any failure that might have
  333. happened. It kind of works like the ``multiprocessing.AsyncResult``
  334. class returned by ``multiprocessing.Pool.map_async``.
  335. * Added dmap() and dmap_async(). This works like the
  336. ``multiprocessing.Pool`` versions except they are tasks
  337. distributed to the celery server. Example:
  338. >>> from celery.task import dmap
  339. >>> import operator
  340. >>> dmap(operator.add, [[2, 2], [4, 4], [8, 8]])
  341. >>> [4, 8, 16]
  342. >>> from celery.task import dmap_async
  343. >>> import operator
  344. >>> result = dmap_async(operator.add, [[2, 2], [4, 4], [8, 8]])
  345. >>> result.ready()
  346. False
  347. >>> time.sleep(1)
  348. >>> result.ready()
  349. True
  350. >>> result.result
  351. [4, 8, 16]
  352. * Refactored the task metadata cache and database backends, and added
  353. a new backend for Tokyo Tyrant. You can set the backend in your django
  354. settings file. e.g::
  355. CELERY_BACKEND = "database"; # Uses the database
  356. CELERY_BACKEND = "cache"; # Uses the django cache framework
  357. CELERY_BACKEND = "tyrant"; # Uses Tokyo Tyrant
  358. TT_HOST = "localhost"; # Hostname for the Tokyo Tyrant server.
  359. TT_PORT = 6657; # Port of the Tokyo Tyrant server.
  360. 0.1.11 [2009-05-12 02:08 P.M CET]
  361. ---------------------------------
  362. * The logging system was leaking file descriptors, resulting in
  363. servers stopping with the EMFILES (too many open files) error. (fixed)
  364. 0.1.10 [2009-05-11 12:46 P.M CET]
  365. ---------------------------------
  366. * Tasks now supports both positional arguments and keyword arguments.
  367. * Requires carrot 0.3.8.
  368. * The daemon now tries to reconnect if the connection is lost.
  369. 0.1.8 [2009-05-07 12:27 P.M CET]
  370. --------------------------------
  371. * Better test coverage
  372. * More documentation
  373. * celeryd doesn't emit ``Queue is empty`` message if
  374. ``settings.CELERYD_EMPTY_MSG_EMIT_EVERY`` is 0.
  375. 0.1.7 [2009-04-30 1:50 P.M CET]
  376. -------------------------------
  377. * Added some unittests
  378. * Can now use the database for task metadata (like if the task has
  379. been executed or not). Set ``settings.CELERY_TASK_META``
  380. * Can now run ``python setup.py test`` to run the unittests from
  381. within the ``testproj`` project.
  382. * Can set the AMQP exchange/routing key/queue using
  383. ``settings.CELERY_AMQP_EXCHANGE``, ``settings.CELERY_AMQP_ROUTING_KEY``,
  384. and ``settings.CELERY_AMQP_CONSUMER_QUEUE``.
  385. 0.1.6 [2009-04-28 2:13 P.M CET]
  386. -------------------------------
  387. * Introducing ``TaskSet``. A set of subtasks is executed and you can
  388. find out how many, or if all them, are done (excellent for progress
  389. bars and such)
  390. * Now catches all exceptions when running ``Task.__call__``, so the
  391. daemon doesn't die. This does't happen for pure functions yet, only
  392. ``Task`` classes.
  393. * ``autodiscover()`` now works with zipped eggs.
  394. * celeryd: Now adds curernt working directory to ``sys.path`` for
  395. convenience.
  396. * The ``run_every`` attribute of ``PeriodicTask`` classes can now be a
  397. ``datetime.timedelta()`` object.
  398. * celeryd: You can now set the ``DJANGO_PROJECT_DIR`` variable
  399. for ``celeryd`` and it will add that to ``sys.path`` for easy launching.
  400. * Can now check if a task has been executed or not via HTTP.
  401. * You can do this by including the celery ``urls.py`` into your project,
  402. >>> url(r'^celery/$', include("celery.urls"))
  403. then visiting the following url,::
  404. http://mysite/celery/$task_id/done/
  405. this will return a JSON dictionary like e.g:
  406. >>> {"task": {"id": $task_id, "executed": true}}
  407. * ``delay_task`` now returns string id, not ``uuid.UUID`` instance.
  408. * Now has ``PeriodicTasks``, to have ``cron`` like functionality.
  409. * Project changed name from ``crunchy`` to ``celery``. The details of
  410. the name change request is in ``docs/name_change_request.txt``.
  411. 0.1.0 [2009-04-24 11:28 A.M CET]
  412. --------------------------------
  413. * Initial release