Changelog 16 KB

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