Changelog 39 KB

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