Changelog 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058
  1. ================
  2. Change history
  3. ================
  4. 1.0.0 [2010-02-10 04:00 P.M CEST]
  5. =================================
  6. BACKWARD INCOMPATIBLE CHANGES
  7. -----------------------------
  8. * Celery does not support detaching anymore, so you have to use the tools
  9. available on your platform, or something like supervisord to make
  10. celeryd/celerybeat/celerymon into background processes.
  11. We've had too many problems with celeryd daemonizing itself, so it was
  12. decided it has to be removed. Example startup scripts has been added to
  13. ``contrib/``:
  14. * Debian, Ubuntu, (start-stop-daemon)
  15. ``contrib/debian/init.d/celeryd``
  16. ``contrib/debian/init.d/celerybeat``
  17. * Mac OS X launchd
  18. ``contrib/mac/org.celeryq.celeryd.plist``
  19. ``contrib/mac/org.celeryq.celerybeat.plist``
  20. ``contrib/mac/org.celeryq.celerymon.plist``
  21. * Supervisord (http://supervisord.org)
  22. ``contrib/supervisord/supervisord.conf``
  23. In addition to ``--detach``, the following program arguments has been
  24. removed: ``--uid``, ``--gid``, ``--workdir``, ``--chroot``, ``--pidfile``,
  25. ``--umask``. All good daemonization tools should support equivalent
  26. functionality, so don't worry.
  27. Also the following configuration keys has been removed:
  28. ``CELERYD_PID_FILE``, ``CELERYBEAT_PID_FILE``, ``CELERYMON_PID_FILE``.
  29. * Default celeryd loglevel is now ``WARN``, to enable the previous log level
  30. start celeryd with ``--loglevel=INFO``.
  31. * Tasks are automatically registered.
  32. This means you no longer have to register your tasks manually.
  33. You don't have to change your old code right away, as it doesn't matter if
  34. a task is registered twice.
  35. If you don't want your task to be automatically registered you can set
  36. the ``abstract`` attribute
  37. .. code-block:: python
  38. class MyTask(Task):
  39. abstract = True
  40. By using ``abstract`` only tasks subclassing this task will be automatically
  41. registered (this works like the Django ORM).
  42. If you don't want subclasses to be registered either, you can set the
  43. ``autoregister`` attribute to ``False``.
  44. Incidentally, this change also fixes the problems with automatic name
  45. assignment and relative imports. So you also don't have to specify a task name
  46. anymore if you use relative imports.
  47. * You can no longer use regular functions as tasks. This change was added
  48. because it makes the internals a lot more clean and simple. However, you can
  49. now turn functions into tasks by using the ``@task`` decorator:
  50. .. code-block:: python
  51. from celery.decorators import task
  52. @task
  53. def add(x, y):
  54. return x + y
  55. See the User Guide: :doc:`userguide/tasks` for more information.
  56. * The periodic task system has been rewritten to a centralized solution, this
  57. means ``celeryd`` no longer schedules periodic tasks by default, but a new
  58. daemon has been introduced: ``celerybeat``.
  59. To launch the periodic task scheduler you have to run celerybeat::
  60. $ celerybeat
  61. Make sure this is running on one server only, if you run it twice, all
  62. periodic tasks will also be executed twice.
  63. If you only have one worker server you can embed it into celeryd like this::
  64. $ celeryd --beat # Embed celerybeat in celeryd.
  65. * The supervisor has been removed, please use something like
  66. http://supervisord.org instead. This means the ``-S`` and ``--supervised``
  67. options to ``celeryd`` is no longer supported.
  68. * ``TaskSet.join`` has been removed, use ``TaskSetResult.join`` instead.
  69. * The task status ``"DONE"`` has been renamed to `"SUCCESS"`.
  70. * ``AsyncResult.is_done`` has been removed, use ``AsyncResult.successful``
  71. instead.
  72. * The worker no longer stores errors if ``Task.ignore_result`` is set, to
  73. revert to the previous behaviour set
  74. ``CELERY_STORE_ERRORS_EVEN_IF_IGNORED`` to ``True``.
  75. * The staticstics functionality has been removed in favor of events,
  76. so the ``-S`` and ``--statistics`` switches has been removed.
  77. * The module ``celery.task.strategy`` has been removed.
  78. * ``celery.discovery`` has been removed, and it's ``autodiscover`` function is
  79. now in ``celery.loaders.djangoapp``. Reason: Internal API.
  80. * ``CELERY_LOADER`` now needs loader class name in addition to module name,
  81. e.g. where you previously had: ``"celery.loaders.default"``, you now need
  82. ``"celery.loaders.default.Loader"``, using the previous syntax will result
  83. in a DeprecationWarning.
  84. * Detecting the loader is now lazy, and so is not done when importing
  85. ``celery.loaders``. To make this happen ``celery.loaders.settings`` has
  86. been renamed to ``load_settings`` and is now a function returning the
  87. settings object. ``celery.loaders.current_loader`` is now also
  88. a function, returning the current loader.
  89. So::
  90. loader = current_loader
  91. needs to be changed to::
  92. loader = current_loader()
  93. DEPRECATIONS
  94. ------------
  95. * The following configuration variables has been renamed and will be
  96. deprecated in v1.2:
  97. * CELERYD_DAEMON_LOG_FORMAT -> CELERYD_LOG_FORMAT
  98. * CELERYD_DAEMON_LOG_LEVEL -> CELERYD_LOG_LEVEL
  99. * CELERY_AMQP_CONNECTION_TIMEOUT -> CELERY_BROKER_CONNECTION_TIMEOUT
  100. * CELERY_AMQP_CONNECTION_RETRY -> CELERY_BROKER_CONNECTION_RETRY
  101. * CELERY_AMQP_CONNECTION_MAX_RETRIES -> CELERY_BROKER_CONNECTION_MAX_RETRIES
  102. * SEND_CELERY_TASK_ERROR_EMAILS -> CELERY_SEND_TASK_ERROR_EMAILS
  103. * The public api names in celery.conf has also changed to a consistent naming
  104. scheme.
  105. * We now support consuming from an arbitrary number of queues, but to do this
  106. we had to rename the configuration syntax. If you use any of the custom
  107. AMQP routing options (queue/exchange/routing_key, etc), you should read the
  108. new FAQ entry: http://bit.ly/aiWoH. The previous syntax is deprecated and
  109. scheduled for removal in v1.2.
  110. * ``TaskSet.run`` has been renamed to ``TaskSet.apply_async``.
  111. ``run`` is still deprecated, and is scheduled for removal in v1.2.
  112. NEWS
  113. ----
  114. * Rate limiting support (per task type, or globally).
  115. * New periodic task system.
  116. * Automatic registration.
  117. * New cool task decorator syntax.
  118. * celeryd now sends events if enabled with the ``-E`` argument.
  119. Excellent for monitoring tools, one is already in the making
  120. (http://github.com/ask/celerymon).
  121. Current events include: worker-heartbeat,
  122. task-[received/succeeded/failed/retried],
  123. worker-online, worker-offline.
  124. * You can now delete (revoke) tasks that has already been applied.
  125. * You can now set the hostname celeryd identifies as using the ``--hostname``
  126. argument.
  127. * Cache backend now respects ``CELERY_TASK_RESULT_EXPIRES``.
  128. * Message format has been standardized and now uses ISO-8601 format
  129. for dates instead of datetime.
  130. * ``celeryd`` now responds to the ``HUP`` signal by restarting itself.
  131. * Periodic tasks are now scheduled on the clock, i.e. ``timedelta(hours=1)``
  132. means every hour at :00 minutes, not every hour from the server starts.
  133. To revert to the previous behaviour you can set
  134. ``PeriodicTask.relative = True``.
  135. * Now supports passing execute options to a TaskSets list of args, e.g.:
  136. >>> ts = TaskSet(add, [([2, 2], {}, {"countdown": 1}),
  137. ... ([4, 4], {}, {"countdown": 2}),
  138. ... ([8, 8], {}, {"countdown": 3})])
  139. >>> ts.run()
  140. * Got a 3x performance gain by setting the prefetch count to four times the
  141. concurrency, (from an average task round-trip of 0.1s to 0.03s!). A new
  142. setting has been added: ``CELERYD_PREFETCH_MULTIPLIER``, which is set
  143. to ``4`` by default.
  144. * Improved support for webhook tasks.
  145. ``celery.task.rest`` is now deprecated, replaced with the new and shiny
  146. :mod:`celery.task.http`. With more reflective names, sensible interface, and
  147. it's possible to override the methods used to perform HTTP requests.
  148. * The results of tasksets are now cached by storing it in the result
  149. backend. FIXME: Only database backend supports this yet!
  150. CHANGES
  151. -------
  152. * Now depends on carrot >= 0.8.1
  153. * New dependencies: billiard, python-dateutil, django-picklefield
  154. * No longer depends on python-daemon
  155. * The ``uuid`` distribution is added as a dependency when running Python 2.4.
  156. * Now remembers the previously detected loader by keeping it in
  157. the ``CELERY_LOADER`` environment variable. This may help on windows where
  158. fork emulation is used.
  159. * ETA no longer sends datetime objects, but uses ISO 8601 date format in a
  160. string for better compatibility with other platforms.
  161. * No longer sends error mails for retried tasks.
  162. * Task can now override the backend used to store results.
  163. * Refactored the ExecuteWrapper, ``apply`` and ``CELERY_ALWAYS_EAGER`` now
  164. also executes the task callbacks and signals.
  165. * Now using a proper scheduler for the tasks with an ETA. This means waiting
  166. eta tasks are sorted by time, so we don't have to poll the whole list all the
  167. time.
  168. * Now also imports modules listed in CELERY_IMPORTS when running
  169. with django (as documented).
  170. * Loglevel for stdout/stderr changed from INFO to ERROR
  171. * ImportErrors are now properly propogated when autodiscovering tasks.
  172. * You can now use ``celery.messaging.establish_connection`` to establish a
  173. connection to the broker.
  174. * When running as a separate service the periodic task scheduler does some
  175. smart moves to not poll too regularly, if you need faster poll times you
  176. can lower the value of ``CELERYBEAT_MAX_LOOP_INTERVAL``.
  177. * You can now change periodic task intervals at runtime, by making
  178. ``run_every`` a property, or subclassing ``PeriodicTask.is_due``.
  179. * The worker now supports control commands enabled through the use of a
  180. broadcast queue, you can remotely revoke tasks or set the rate limit for
  181. a task type. See :mod:`celery.task.control`.
  182. * The services now sets informative process names (as shown in ``ps``
  183. listings) if the :mod:`setproctitle` module is installed.
  184. * :exc:`celery.exceptions.NotRegistered` now inherits from :exc:`KeyError`,
  185. and ``TaskRegistry.__getitem__``+``pop`` raises ``NotRegistered`` instead
  186. * You can set the loader via the ``CELERY_LOADER`` environment variable.
  187. * You can now set ``CELERY_IGNORE_RESULT`` to ignore task results by default
  188. (if enabled, tasks doesn't save results or errors to the backend used).
  189. * celeryd now correctly handles malformed messages by throwing away and
  190. acknowledging the message, instead of crashing.
  191. BUGS
  192. ----
  193. * Fixed a race condition that could happen while storing task results in the
  194. database.
  195. DOCUMENTATION
  196. -------------
  197. * Reference now split into two sections; API reference and internal module
  198. reference.
  199. 0.8.4 [2010-02-05 01:52 P.M CEST]
  200. ---------------------------------
  201. * Now emits a warning if the --detach argument is used.
  202. --detach should not be used anymore, as it has several not easily fixed
  203. bugs related to it. Instead, use something like start-stop-daemon,
  204. supervisord or launchd (os x).
  205. * Make sure logger class is process aware, even if running Python >= 2.6.
  206. * Error e-mails are not sent anymore when the task is retried.
  207. 0.8.3 [2009-12-22 09:43 A.M CEST]
  208. ---------------------------------
  209. * Fixed a possible race condition that could happen when storing/querying
  210. task results using the the database backend.
  211. * Now has console script entry points in the setup.py file, so tools like
  212. buildout will correctly install the programs celerybin and celeryinit.
  213. 0.8.2 [2009-11-20 03:40 P.M CEST]
  214. ---------------------------------
  215. * QOS Prefetch count was not applied properly, as it was set for every message
  216. received (which apparently behaves like, "receive one more"), instead of only
  217. set when our wanted value cahnged.
  218. 0.8.1 [2009-11-16 05:21 P.M CEST]
  219. =================================
  220. VERY IMPORTANT NOTE
  221. -------------------
  222. This release (with carrot 0.8.0) enables AMQP QoS (quality of service), which
  223. means the workers will only receive as many messages as it can handle at a
  224. time. As with any release, you should test this version upgrade on your
  225. development servers before rolling it out to production!
  226. IMPORTANT CHANGES
  227. -----------------
  228. * If you're using Python < 2.6 and you use the multiprocessing backport, then
  229. multiprocessing version 2.6.2.1 is required.
  230. * All AMQP_* settings has been renamed to BROKER_*, and in addition
  231. AMQP_SERVER has been renamed to BROKER_HOST, so before where you had::
  232. AMQP_SERVER = "localhost"
  233. AMQP_PORT = 5678
  234. AMQP_USER = "myuser"
  235. AMQP_PASSWORD = "mypassword"
  236. AMQP_VHOST = "celery"
  237. You need to change that to::
  238. BROKER_HOST = "localhost"
  239. BROKER_PORT = 5678
  240. BROKER_USER = "myuser"
  241. BROKER_PASSWORD = "mypassword"
  242. BROKER_VHOST = "celery"
  243. * Custom carrot backends now need to include the backend class name, so before
  244. where you had::
  245. CARROT_BACKEND = "mycustom.backend.module"
  246. you need to change it to::
  247. CARROT_BACKEND = "mycustom.backend.module.Backend"
  248. where ``Backend`` is the class name. This is probably ``"Backend"``, as
  249. that was the previously implied name.
  250. * New version requirement for carrot: 0.8.0
  251. CHANGES
  252. -------
  253. * Incorporated the multiprocessing backport patch that fixes the
  254. ``processName`` error.
  255. * Ignore the result of PeriodicTask's by default.
  256. * Added a Redis result store backend
  257. * Allow /etc/default/celeryd to define additional options for the celeryd init
  258. script.
  259. * MongoDB periodic tasks issue when using different time than UTC fixed.
  260. * Windows specific: Negate test for available os.fork (thanks miracle2k)
  261. * Now tried to handle broken PID files.
  262. * Added a Django test runner to contrib that sets CELERY_ALWAYS_EAGER = True for testing with the database backend
  263. * Added a CELERY_CACHE_BACKEND setting for using something other than the django-global cache backend.
  264. * Use custom implementation of functools.partial (curry) for Python 2.4 support
  265. (Probably still problems with running on 2.4, but it will eventually be
  266. supported)
  267. * Prepare exception to pickle when saving RETRY status for all backends.
  268. * SQLite no concurrency limit should only be effective if the db backend is used.
  269. 0.8.0 [2009-09-22 03:06 P.M CEST]
  270. =================================
  271. BACKWARD INCOMPATIBLE CHANGES
  272. -----------------------------
  273. * Add traceback to result value on failure.
  274. **NOTE** If you use the database backend you have to re-create the
  275. database table ``celery_taskmeta``.
  276. Contact the mailinglist or IRC channel listed in README for help
  277. doing this.
  278. * Database tables are now only created if the database backend is used,
  279. so if you change back to the database backend at some point,
  280. be sure to initialize tables (django: ``syncdb``, python: ``celeryinit``).
  281. (Note: This is only the case when using Django 1.1 or higher)
  282. * Now depends on ``carrot`` version 0.6.0.
  283. * Now depends on python-daemon 1.4.8
  284. IMPORTANT CHANGES
  285. -----------------
  286. * Celery can now be used in pure Python (outside of a Django project).
  287. This means celery is no longer Django specific.
  288. For more information see the FAQ entry
  289. `Can I use celery without Django?`_.
  290. .. _`Can I use celery without Django?`:
  291. http://ask.github.com/celery/faq.html#can-i-use-celery-without-django
  292. * Celery now supports task retries.
  293. See `Cookbook: Retrying Tasks`_ for more information.
  294. .. _`Cookbook: Retrying Tasks`:
  295. http://ask.github.com/celery/cookbook/task-retries.html
  296. * We now have an AMQP result store backend.
  297. It uses messages to publish task return value and status. And it's
  298. incredibly fast!
  299. See http://github.com/ask/celery/issues/closed#issue/6 for more info!
  300. * AMQP QoS (prefetch count) implemented:
  301. This to not receive more messages than we can handle.
  302. * Now redirects stdout/stderr to the celeryd logfile when detached
  303. * Now uses ``inspect.getargspec`` to only pass default arguments
  304. the task supports.
  305. * Add Task.on_success, .on_retry, .on_failure handlers
  306. See :meth:`celery.task.base.Task.on_success`,
  307. :meth:`celery.task.base.Task.on_retry`,
  308. :meth:`celery.task.base.Task.on_failure`,
  309. * ``celery.utils.gen_unique_id``: Workaround for
  310. http://bugs.python.org/issue4607
  311. * You can now customize what happens at worker start, at process init, etc
  312. by creating your own loaders. (see :mod:`celery.loaders.default`,
  313. :mod:`celery.loaders.djangoapp`, :mod:`celery.loaders`.)
  314. * Support for multiple AMQP exchanges and queues.
  315. This feature misses documentation and tests, so anyone interested
  316. is encouraged to improve this situation.
  317. * celeryd now survives a restart of the AMQP server!
  318. Automatically re-establish AMQP broker connection if it's lost.
  319. New settings:
  320. * AMQP_CONNECTION_RETRY
  321. Set to ``True`` to enable connection retries.
  322. * AMQP_CONNECTION_MAX_RETRIES.
  323. Maximum number of restarts before we give up. Default: ``100``.
  324. NEWS
  325. ----
  326. * Fix an incompatibility between python-daemon and multiprocessing,
  327. which resulted in the ``[Errno 10] No child processes`` problem when
  328. detaching.
  329. * Fixed a possible DjangoUnicodeDecodeError being raised when saving pickled
  330. data to Django's memcached cache backend.
  331. * Better Windows compatibility.
  332. * New version of the pickled field (taken from
  333. http://www.djangosnippets.org/snippets/513/)
  334. * New signals introduced: ``task_sent``, ``task_prerun`` and
  335. ``task_postrun``, see :mod:`celery.signals` for more information.
  336. * ``TaskSetResult.join`` caused ``TypeError`` when ``timeout=None``.
  337. Thanks Jerzy Kozera. Closes #31
  338. * ``views.apply`` should return ``HttpResponse`` instance.
  339. Thanks to Jerzy Kozera. Closes #32
  340. * ``PeriodicTask``: Save conversion of ``run_every`` from ``int``
  341. to ``timedelta`` to the class attribute instead of on the instance.
  342. * Exceptions has been moved to ``celery.exceptions``, but are still
  343. available in the previous module.
  344. * Try to rollback transaction and retry saving result if an error happens
  345. while setting task status with the database backend.
  346. * jail() refactored into :class:`celery.execute.ExecuteWrapper`.
  347. * ``views.apply`` now correctly sets mimetype to "application/json"
  348. * ``views.task_status`` now returns exception if status is RETRY
  349. * ``views.task_status`` now returns traceback if status is "FAILURE"
  350. or "RETRY"
  351. * Documented default task arguments.
  352. * Add a sensible __repr__ to ExceptionInfo for easier debugging
  353. * Fix documentation typo ``.. import map`` -> ``.. import dmap``.
  354. Thanks mikedizon
  355. 0.6.0 [2009-08-07 06:54 A.M CET]
  356. ================================
  357. IMPORTANT CHANGES
  358. -----------------
  359. * Fixed a bug where tasks raising unpickleable exceptions crashed pool
  360. workers. So if you've had pool workers mysteriously dissapearing, or
  361. problems with celeryd stopping working, this has been fixed in this
  362. version.
  363. * Fixed a race condition with periodic tasks.
  364. * The task pool is now supervised, so if a pool worker crashes,
  365. goes away or stops responding, it is automatically replaced with
  366. a new one.
  367. * Task.name is now automatically generated out of class module+name, e.g.
  368. ``"djangotwitter.tasks.UpdateStatusesTask"``. Very convenient. No idea why
  369. we didn't do this before. Some documentation is updated to not manually
  370. specify a task name.
  371. NEWS
  372. ----
  373. * Tested with Django 1.1
  374. * New Tutorial: Creating a click counter using carrot and celery
  375. * Database entries for periodic tasks are now created at ``celeryd``
  376. startup instead of for each check (which has been a forgotten TODO/XXX
  377. in the code for a long time)
  378. * New settings variable: ``CELERY_TASK_RESULT_EXPIRES``
  379. Time (in seconds, or a `datetime.timedelta` object) for when after
  380. stored task results are deleted. For the moment this only works for the
  381. database backend.
  382. * ``celeryd`` now emits a debug log message for which periodic tasks
  383. has been launched.
  384. * The periodic task table is now locked for reading while getting
  385. periodic task status. (MySQL only so far, seeking patches for other
  386. engines)
  387. * A lot more debugging information is now available by turning on the
  388. ``DEBUG`` loglevel (``--loglevel=DEBUG``).
  389. * Functions/methods with a timeout argument now works correctly.
  390. * New: ``celery.strategy.even_time_distribution``:
  391. With an iterator yielding task args, kwargs tuples, evenly distribute
  392. the processing of its tasks throughout the time window available.
  393. * Log message ``Unknown task ignored...`` now has loglevel ``ERROR``
  394. * Log message ``"Got task from broker"`` is now emitted for all tasks, even if
  395. the task has an ETA (estimated time of arrival). Also the message now
  396. includes the ETA for the task (if any).
  397. * Acknowledgement now happens in the pool callback. Can't do ack in the job
  398. target, as it's not pickleable (can't share AMQP connection, etc)).
  399. * Added note about .delay hanging in README
  400. * Tests now passing in Django 1.1
  401. * Fixed discovery to make sure app is in INSTALLED_APPS
  402. * Previously overrided pool behaviour (process reap, wait until pool worker
  403. available, etc.) is now handled by ``multiprocessing.Pool`` itself.
  404. * Convert statistics data to unicode for use as kwargs. Thanks Lucy!
  405. 0.4.1 [2009-07-02 01:42 P.M CET]
  406. ================================
  407. * Fixed a bug with parsing the message options (``mandatory``,
  408. ``routing_key``, ``priority``, ``immediate``)
  409. 0.4.0 [2009-07-01 07:29 P.M CET]
  410. ================================
  411. * Adds eager execution. ``celery.execute.apply``|``Task.apply`` executes the
  412. function blocking until the task is done, for API compatiblity it
  413. returns an ``celery.result.EagerResult`` instance. You can configure
  414. celery to always run tasks locally by setting the
  415. ``CELERY_ALWAYS_EAGER`` setting to ``True``.
  416. * Now depends on ``anyjson``.
  417. * 99% coverage using python ``coverage`` 3.0.
  418. 0.3.20 [2009-06-25 08:42 P.M CET]
  419. =================================
  420. * New arguments to ``apply_async`` (the advanced version of
  421. ``delay_task``), ``countdown`` and ``eta``;
  422. >>> # Run 10 seconds into the future.
  423. >>> res = apply_async(MyTask, countdown=10);
  424. >>> # Run 1 day from now
  425. >>> res = apply_async(MyTask, eta=datetime.now() +
  426. ... timedelta(days=1)
  427. * Now unlinks the pidfile if it's stale.
  428. * Lots of more tests.
  429. * Now compatible with carrot >= 0.5.0.
  430. * **IMPORTANT** The ``subtask_ids`` attribute on the ``TaskSetResult``
  431. instance has been removed. To get this information instead use:
  432. >>> subtask_ids = [subtask.task_id for subtask in ts_res.subtasks]
  433. * ``Taskset.run()`` now respects extra message options from the task class.
  434. * Task: Add attribute ``ignore_result``: Don't store the status and
  435. return value. This means you can't use the
  436. ``celery.result.AsyncResult`` to check if the task is
  437. done, or get its return value. Only use if you need the performance
  438. and is able live without these features. Any exceptions raised will
  439. store the return value/status as usual.
  440. * Task: Add attribute ``disable_error_emails`` to disable sending error
  441. emails for that task.
  442. * Should now work on Windows (although running in the background won't
  443. work, so using the ``--detach`` argument results in an exception
  444. being raised.)
  445. * Added support for statistics for profiling and monitoring.
  446. To start sending statistics start ``celeryd`` with the
  447. ``--statistics`` option. Then after a while you can dump the results
  448. by running ``python manage.py celerystats``. See
  449. ``celery.monitoring`` for more information.
  450. * The celery daemon can now be supervised (i.e it is automatically
  451. restarted if it crashes). To use this start celeryd with the
  452. ``--supervised`` option (or alternatively ``-S``).
  453. * views.apply: View applying a task. Example::
  454. http://e.com/celery/apply/task_name/arg1/arg2//?kwarg1=a&kwarg2=b
  455. **NOTE** Use with caution, preferably not make this publicly
  456. accessible without ensuring your code is safe!
  457. * Refactored ``celery.task``. It's now split into three modules:
  458. * celery.task
  459. Contains ``apply_async``, ``delay_task``, ``discard_all``, and task
  460. shortcuts, plus imports objects from ``celery.task.base`` and
  461. ``celery.task.builtins``
  462. * celery.task.base
  463. Contains task base classes: ``Task``, ``PeriodicTask``,
  464. ``TaskSet``, ``AsynchronousMapTask``, ``ExecuteRemoteTask``.
  465. * celery.task.builtins
  466. Built-in tasks: ``PingTask``, ``DeleteExpiredTaskMetaTask``.
  467. 0.3.7 [2008-06-16 11:41 P.M CET]
  468. --------------------------------
  469. * **IMPORTANT** Now uses AMQP's ``basic.consume`` instead of
  470. ``basic.get``. This means we're no longer polling the broker for
  471. new messages.
  472. * **IMPORTANT** Default concurrency limit is now set to the number of CPUs
  473. available on the system.
  474. * **IMPORTANT** ``tasks.register``: Renamed ``task_name`` argument to
  475. ``name``, so
  476. >>> tasks.register(func, task_name="mytask")
  477. has to be replaced with:
  478. >>> tasks.register(func, name="mytask")
  479. * The daemon now correctly runs if the pidlock is stale.
  480. * Now compatible with carrot 0.4.5
  481. * Default AMQP connnection timeout is now 4 seconds.
  482. * ``AsyncResult.read()`` was always returning ``True``.
  483. * Only use README as long_description if the file exists so easy_install
  484. doesn't break.
  485. * ``celery.view``: JSON responses now properly set its mime-type.
  486. * ``apply_async`` now has a ``connection`` keyword argument so you
  487. can re-use the same AMQP connection if you want to execute
  488. more than one task.
  489. * Handle failures in task_status view such that it won't throw 500s.
  490. * Fixed typo ``AMQP_SERVER`` in documentation to ``AMQP_HOST``.
  491. * Worker exception e-mails sent to admins now works properly.
  492. * No longer depends on ``django``, so installing ``celery`` won't affect
  493. the preferred Django version installed.
  494. * Now works with PostgreSQL (psycopg2) again by registering the
  495. ``PickledObject`` field.
  496. * ``celeryd``: Added ``--detach`` option as an alias to ``--daemon``, and
  497. it's the term used in the documentation from now on.
  498. * Make sure the pool and periodic task worker thread is terminated
  499. properly at exit. (So ``Ctrl-C`` works again).
  500. * Now depends on ``python-daemon``.
  501. * Removed dependency to ``simplejson``
  502. * Cache Backend: Re-establishes connection for every task process
  503. if the Django cache backend is memcached/libmemcached.
  504. * Tyrant Backend: Now re-establishes the connection for every task
  505. executed.
  506. 0.3.3 [2009-06-08 01:07 P.M CET]
  507. ================================
  508. * The ``PeriodicWorkController`` now sleeps for 1 second between checking
  509. for periodic tasks to execute.
  510. 0.3.2 [2009-06-08 01:07 P.M CET]
  511. ================================
  512. * celeryd: Added option ``--discard``: Discard (delete!) all waiting
  513. messages in the queue.
  514. * celeryd: The ``--wakeup-after`` option was not handled as a float.
  515. 0.3.1 [2009-06-08 01:07 P.M CET]
  516. ================================
  517. * The `PeriodicTask`` worker is now running in its own thread instead
  518. of blocking the ``TaskController`` loop.
  519. * Default ``QUEUE_WAKEUP_AFTER`` has been lowered to ``0.1`` (was ``0.3``)
  520. 0.3.0 [2009-06-08 12:41 P.M CET]
  521. ================================
  522. **NOTE** This is a development version, for the stable release, please
  523. see versions 0.2.x.
  524. **VERY IMPORTANT:** Pickle is now the encoder used for serializing task
  525. arguments, so be sure to flush your task queue before you upgrade.
  526. * **IMPORTANT** TaskSet.run() now returns a celery.result.TaskSetResult
  527. instance, which lets you inspect the status and return values of a
  528. taskset as it was a single entity.
  529. * **IMPORTANT** Celery now depends on carrot >= 0.4.1.
  530. * The celery daemon now sends task errors to the registered admin e-mails.
  531. To turn off this feature, set ``SEND_CELERY_TASK_ERROR_EMAILS`` to
  532. ``False`` in your ``settings.py``. Thanks to Grégoire Cachet.
  533. * You can now run the celery daemon by using ``manage.py``::
  534. $ python manage.py celeryd
  535. Thanks to Grégoire Cachet.
  536. * Added support for message priorities, topic exchanges, custom routing
  537. keys for tasks. This means we have introduced
  538. ``celery.task.apply_async``, a new way of executing tasks.
  539. You can use ``celery.task.delay`` and ``celery.Task.delay`` like usual, but
  540. if you want greater control over the message sent, you want
  541. ``celery.task.apply_async`` and ``celery.Task.apply_async``.
  542. This also means the AMQP configuration has changed. Some settings has
  543. been renamed, while others are new::
  544. CELERY_AMQP_EXCHANGE
  545. CELERY_AMQP_PUBLISHER_ROUTING_KEY
  546. CELERY_AMQP_CONSUMER_ROUTING_KEY
  547. CELERY_AMQP_CONSUMER_QUEUE
  548. CELERY_AMQP_EXCHANGE_TYPE
  549. See the entry `Can I send some tasks to only some servers?`_ in the
  550. `FAQ`_ for more information.
  551. .. _`Can I send some tasks to only some servers?`:
  552. http://bit.ly/celery_AMQP_routing
  553. .. _`FAQ`: http://ask.github.com/celery/faq.html
  554. * Task errors are now logged using loglevel ``ERROR`` instead of ``INFO``,
  555. and backtraces are dumped. Thanks to Grégoire Cachet.
  556. * Make every new worker process re-establish it's Django DB connection,
  557. this solving the "MySQL connection died?" exceptions.
  558. Thanks to Vitaly Babiy and Jirka Vejrazka.
  559. * **IMOPORTANT** Now using pickle to encode task arguments. This means you
  560. now can pass complex python objects to tasks as arguments.
  561. * Removed dependency to ``yadayada``.
  562. * Added a FAQ, see ``docs/faq.rst``.
  563. * Now converts any unicode keys in task ``kwargs`` to regular strings.
  564. Thanks Vitaly Babiy.
  565. * Renamed the ``TaskDaemon`` to ``WorkController``.
  566. * ``celery.datastructures.TaskProcessQueue`` is now renamed to
  567. ``celery.pool.TaskPool``.
  568. * The pool algorithm has been refactored for greater performance and
  569. stability.
  570. 0.2.0 [2009-05-20 05:14 P.M CET]
  571. ================================
  572. * Final release of 0.2.0
  573. * Compatible with carrot version 0.4.0.
  574. * Fixes some syntax errors related to fetching results
  575. from the database backend.
  576. 0.2.0-pre3 [2009-05-20 05:14 P.M CET]
  577. =====================================
  578. * *Internal release*. Improved handling of unpickled exceptions,
  579. ``get_result`` now tries to recreate something looking like the
  580. original exception.
  581. 0.2.0-pre2 [2009-05-20 01:56 P.M CET]
  582. =====================================
  583. * Now handles unpickleable exceptions (like the dynimically generated
  584. subclasses of ``django.core.exception.MultipleObjectsReturned``).
  585. 0.2.0-pre1 [2009-05-20 12:33 P.M CET]
  586. =====================================
  587. * It's getting quite stable, with a lot of new features, so bump
  588. version to 0.2. This is a pre-release.
  589. * ``celery.task.mark_as_read()`` and ``celery.task.mark_as_failure()`` has
  590. been removed. Use ``celery.backends.default_backend.mark_as_read()``,
  591. and ``celery.backends.default_backend.mark_as_failure()`` instead.
  592. 0.1.15 [2009-05-19 04:13 P.M CET]
  593. =================================
  594. * The celery daemon was leaking AMQP connections, this should be fixed,
  595. if you have any problems with too many files open (like ``emfile``
  596. errors in ``rabbit.log``, please contact us!
  597. 0.1.14 [2009-05-19 01:08 P.M CET]
  598. =================================
  599. * Fixed a syntax error in the ``TaskSet`` class. (No such variable
  600. ``TimeOutError``).
  601. 0.1.13 [2009-05-19 12:36 P.M CET]
  602. =================================
  603. * Forgot to add ``yadayada`` to install requirements.
  604. * Now deletes all expired task results, not just those marked as done.
  605. * Able to load the Tokyo Tyrant backend class without django
  606. configuration, can specify tyrant settings directly in the class
  607. constructor.
  608. * Improved API documentation
  609. * Now using the Sphinx documentation system, you can build
  610. the html documentation by doing ::
  611. $ cd docs
  612. $ make html
  613. and the result will be in ``docs/.build/html``.
  614. 0.1.12 [2009-05-18 04:38 P.M CET]
  615. =================================
  616. * ``delay_task()`` etc. now returns ``celery.task.AsyncResult`` object,
  617. which lets you check the result and any failure that might have
  618. happened. It kind of works like the ``multiprocessing.AsyncResult``
  619. class returned by ``multiprocessing.Pool.map_async``.
  620. * Added dmap() and dmap_async(). This works like the
  621. ``multiprocessing.Pool`` versions except they are tasks
  622. distributed to the celery server. Example:
  623. >>> from celery.task import dmap
  624. >>> import operator
  625. >>> dmap(operator.add, [[2, 2], [4, 4], [8, 8]])
  626. >>> [4, 8, 16]
  627. >>> from celery.task import dmap_async
  628. >>> import operator
  629. >>> result = dmap_async(operator.add, [[2, 2], [4, 4], [8, 8]])
  630. >>> result.ready()
  631. False
  632. >>> time.sleep(1)
  633. >>> result.ready()
  634. True
  635. >>> result.result
  636. [4, 8, 16]
  637. * Refactored the task metadata cache and database backends, and added
  638. a new backend for Tokyo Tyrant. You can set the backend in your django
  639. settings file. e.g::
  640. CELERY_BACKEND = "database"; # Uses the database
  641. CELERY_BACKEND = "cache"; # Uses the django cache framework
  642. CELERY_BACKEND = "tyrant"; # Uses Tokyo Tyrant
  643. TT_HOST = "localhost"; # Hostname for the Tokyo Tyrant server.
  644. TT_PORT = 6657; # Port of the Tokyo Tyrant server.
  645. 0.1.11 [2009-05-12 02:08 P.M CET]
  646. =================================
  647. * The logging system was leaking file descriptors, resulting in
  648. servers stopping with the EMFILES (too many open files) error. (fixed)
  649. 0.1.10 [2009-05-11 12:46 P.M CET]
  650. =================================
  651. * Tasks now supports both positional arguments and keyword arguments.
  652. * Requires carrot 0.3.8.
  653. * The daemon now tries to reconnect if the connection is lost.
  654. 0.1.8 [2009-05-07 12:27 P.M CET]
  655. ================================
  656. * Better test coverage
  657. * More documentation
  658. * celeryd doesn't emit ``Queue is empty`` message if
  659. ``settings.CELERYD_EMPTY_MSG_EMIT_EVERY`` is 0.
  660. 0.1.7 [2009-04-30 1:50 P.M CET]
  661. ===============================
  662. * Added some unittests
  663. * Can now use the database for task metadata (like if the task has
  664. been executed or not). Set ``settings.CELERY_TASK_META``
  665. * Can now run ``python setup.py test`` to run the unittests from
  666. within the ``testproj`` project.
  667. * Can set the AMQP exchange/routing key/queue using
  668. ``settings.CELERY_AMQP_EXCHANGE``, ``settings.CELERY_AMQP_ROUTING_KEY``,
  669. and ``settings.CELERY_AMQP_CONSUMER_QUEUE``.
  670. 0.1.6 [2009-04-28 2:13 P.M CET]
  671. ===============================
  672. * Introducing ``TaskSet``. A set of subtasks is executed and you can
  673. find out how many, or if all them, are done (excellent for progress
  674. bars and such)
  675. * Now catches all exceptions when running ``Task.__call__``, so the
  676. daemon doesn't die. This does't happen for pure functions yet, only
  677. ``Task`` classes.
  678. * ``autodiscover()`` now works with zipped eggs.
  679. * celeryd: Now adds curernt working directory to ``sys.path`` for
  680. convenience.
  681. * The ``run_every`` attribute of ``PeriodicTask`` classes can now be a
  682. ``datetime.timedelta()`` object.
  683. * celeryd: You can now set the ``DJANGO_PROJECT_DIR`` variable
  684. for ``celeryd`` and it will add that to ``sys.path`` for easy launching.
  685. * Can now check if a task has been executed or not via HTTP.
  686. * You can do this by including the celery ``urls.py`` into your project,
  687. >>> url(r'^celery/$', include("celery.urls"))
  688. then visiting the following url,::
  689. http://mysite/celery/$task_id/done/
  690. this will return a JSON dictionary like e.g:
  691. >>> {"task": {"id": $task_id, "executed": true}}
  692. * ``delay_task`` now returns string id, not ``uuid.UUID`` instance.
  693. * Now has ``PeriodicTasks``, to have ``cron`` like functionality.
  694. * Project changed name from ``crunchy`` to ``celery``. The details of
  695. the name change request is in ``docs/name_change_request.txt``.
  696. 0.1.0 [2009-04-24 11:28 A.M CET]
  697. ================================
  698. * Initial release