Changelog 40 KB

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