Changelog 54 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629
  1. ================
  2. Change history
  3. ================
  4. 1.0.6 [2010-06-30 09:57 A.M CEST]
  5. =================================
  6. * RabbitMQ 1.8.0 has extended their exchange equivalence tests to
  7. include ``auto_delete`` and ``durable``. This broke the AMQP backend.
  8. If you've already used the AMQP backend this means you have to
  9. delete the previous definitions::
  10. $ PYTHONPATH=. camqadm exchange.delete celeryresults
  11. or::
  12. $ python manage.py camqadm exchange.delete celeryresults
  13. 1.0.5 [2010-06-01 02:36 P.M CEST]
  14. =================================
  15. Critical
  16. --------
  17. * SIGINT/Ctrl+C killed the pool, abrubtly terminating the currently executing
  18. tasks.
  19. Fixed by making the pool worker processes ignore :const:`SIGINT`.
  20. * Should not close the consumers before the pool is terminated, just cancel the consumers.
  21. Issue #122. http://github.com/ask/celery/issues/issue/122
  22. * Now depends on :mod:`billiard` >= 0.3.1
  23. * celeryd: Previously exceptions raised by worker components could stall startup,
  24. now it correctly logs the exceptions and shuts down.
  25. * celeryd: Prefetch counts was set too late. QoS is now set as early as possible,
  26. so celeryd can't slurp in all the messages at start-up.
  27. Changes
  28. -------
  29. * :mod:`celery.contrib.abortable`: Abortable tasks.
  30. Tasks that defines steps of execution, the task can then
  31. be aborted after each step has completed.
  32. * :class:`~celery.events.EventDispatcher`: No longer creates AMQP channel
  33. if events are disabled
  34. * Added required RPM package names under ``[bdist_rpm]`` section, to support building RPMs
  35. from the sources using setup.py
  36. * Running unittests: :envvar:`NOSE_VERBOSE` environment var now enables verbose output from Nose.
  37. * :func:`celery.execute.apply`: Pass logfile/loglevel arguments as task kwargs.
  38. Issue #110 http://github.com/ask/celery/issues/issue/110
  39. * celery.execute.apply: Should return exception, not :class:`~celery.datastructures.ExceptionInfo`
  40. on error.
  41. Issue #111 http://github.com/ask/celery/issues/issue/111
  42. * Added new entries to the :doc:`FAQs <faq>`:
  43. * Should I use retry or acks_late?
  44. * Can I execute a task by name?
  45. 1.0.4 [2010-05-31 09:54 A.M CEST]
  46. =================================
  47. * Changlog merged with 1.0.5 as the release was never announced.
  48. 1.0.3 [2010-05-15 03:00 P.M CEST]
  49. =================================
  50. Important notes
  51. ---------------
  52. * Messages are now acked *just before* the task function is executed.
  53. This is the behavior we've wanted all along, but couldn't have because of
  54. limitations in the multiprocessing module.
  55. The previous behavior was not good, and the situation worsened with the
  56. release of 1.0.1, so this change will definitely improve
  57. reliability, performance and operations in general.
  58. For more information please see http://bit.ly/9hom6T
  59. * Database result backend: result now explicitly sets ``null=True`` as
  60. ``django-picklefield`` version 0.1.5 changed the default behavior
  61. right under our noses :(
  62. See: http://bit.ly/d5OwMr
  63. This means those who created their celery tables (via syncdb or
  64. celeryinit) with picklefield versions >= 0.1.5 has to alter their tables to
  65. allow the result field to be ``NULL`` manually.
  66. MySQL::
  67. ALTER TABLE celery_taskmeta MODIFY result TEXT NULL
  68. * Removed ``Task.rate_limit_queue_type``, as it was not really useful
  69. and made it harder to refactor some parts.
  70. * Now depends on carrot >= 0.10.4
  71. * Now depends on billiard >= 0.3.0
  72. News
  73. ----
  74. * AMQP backend: Added timeout support for ``result.get()`` /
  75. ``result.wait()``.
  76. * New task option: ``Task.acks_late`` (default: ``CELERY_ACKS_LATE``)
  77. Late ack means the task messages will be acknowledged **after** the task
  78. has been executed, not *just before*, which is the default behavior.
  79. Note that this means the tasks may be executed twice if the worker
  80. crashes in the middle of their execution. Not acceptable for most
  81. applications, but desirable for others.
  82. * Added crontab-like scheduling to periodic tasks.
  83. Like a cron job, you can specify units of time of when
  84. you would like the task to execute. While not a full implementation
  85. of cron's features, it should provide a fair degree of common scheduling
  86. needs.
  87. You can specify a minute (0-59), an hour (0-23), and/or a day of the
  88. week (0-6 where 0 is Sunday, or by names: sun, mon, tue, wed, thu, fri,
  89. sat).
  90. Examples:
  91. .. code-block:: python
  92. from celery.task.schedules import crontab
  93. from celery.decorators import periodic_task
  94. @periodic_task(run_every=crontab(hour=7, minute=30))
  95. def every_morning():
  96. print("Runs every morning at 7:30a.m")
  97. @periodic_task(run_every=crontab(hour=7, minute=30, day_of_week="mon"))
  98. def every_monday_morning():
  99. print("Run every monday morning at 7:30a.m")
  100. @periodic_task(run_every=crontab(minutes=30))
  101. def every_hour():
  102. print("Runs every hour on the clock. e.g. 1:30, 2:30, 3:30 etc.")
  103. Note that this a late addition. While we have unittests, due to the
  104. nature of this feature we haven't been able to completely test this
  105. in practice, so consider this experimental.
  106. * ``TaskPool.apply_async``: Now supports the ``accept_callback`` argument.
  107. * ``apply_async``: Now raises :exc:`ValueError` if task args is not a list,
  108. or kwargs is not a tuple (http://github.com/ask/celery/issues/issue/95).
  109. * ``Task.max_retries`` can now be ``None``, which means it will retry forever.
  110. * Celerybeat: Now reuses the same connection when publishing large
  111. sets of tasks.
  112. * Modified the task locking example in the documentation to use
  113. ``cache.add`` for atomic locking.
  114. * Added experimental support for a *started* status on tasks.
  115. If ``Task.track_started`` is enabled the task will report its status
  116. as "started" when the task is executed by a worker.
  117. The default value is ``False`` as the normal behaviour is to not
  118. report that level of granularity. Tasks are either pending, finished,
  119. or waiting to be retried. Having a "started" status can be useful for
  120. when there are long running tasks and there is a need to report which
  121. task is currently running.
  122. The global default can be overridden by the ``CELERY_TRACK_STARTED``
  123. setting.
  124. * User Guide: New section ``Tips and Best Practices``.
  125. Contributions welcome!
  126. Remote control commands
  127. -----------------------
  128. * Remote control commands can now send replies back to the caller.
  129. Existing commands has been improved to send replies, and the client
  130. interface in ``celery.task.control`` has new keyword arguments: ``reply``,
  131. ``timeout`` and ``limit``. Where reply means it will wait for replies,
  132. timeout is the time in seconds to stop waiting for replies, and limit
  133. is the maximum number of replies to get.
  134. By default, it will wait for as many replies as possible for one second.
  135. * rate_limit(task_name, destination=all, reply=False, timeout=1, limit=0)
  136. Worker returns ``{"ok": message}`` on success,
  137. or ``{"failure": message}`` on failure.
  138. >>> from celery.task.control import rate_limit
  139. >>> rate_limit("tasks.add", "10/s", reply=True)
  140. [{'worker1': {'ok': 'new rate limit set successfully'}},
  141. {'worker2': {'ok': 'new rate limit set successfully'}}]
  142. * ping(destination=all, reply=False, timeout=1, limit=0)
  143. Worker returns the simple message ``"pong"``.
  144. >>> from celery.task.control import ping
  145. >>> ping(reply=True)
  146. [{'worker1': 'pong'},
  147. {'worker2': 'pong'},
  148. * revoke(destination=all, reply=False, timeout=1, limit=0)
  149. Worker simply returns ``True``.
  150. >>> from celery.task.control import revoke
  151. >>> revoke("419e46eb-cf6a-4271-86a8-442b7124132c", reply=True)
  152. [{'worker1': True},
  153. {'worker2'; True}]
  154. * You can now add your own remote control commands!
  155. Remote control commands are functions registered in the command
  156. registry. Registering a command is done using
  157. :meth:`celery.worker.control.Panel.register`:
  158. .. code-block:: python
  159. from celery.task.control import Panel
  160. @Panel.register
  161. def reset_broker_connection(panel, **kwargs):
  162. panel.listener.reset_connection()
  163. return {"ok": "connection re-established"}
  164. With this module imported in the worker, you can launch the command
  165. using ``celery.task.control.broadcast``::
  166. >>> from celery.task.control import broadcast
  167. >>> broadcast("reset_broker_connection", reply=True)
  168. [{'worker1': {'ok': 'connection re-established'},
  169. {'worker2': {'ok': 'connection re-established'}}]
  170. **TIP** You can choose the worker(s) to receive the command
  171. by using the ``destination`` argument::
  172. >>> broadcast("reset_broker_connection", destination=["worker1"])
  173. [{'worker1': {'ok': 'connection re-established'}]
  174. * New remote control command: ``dump_reserved``
  175. Dumps tasks reserved by the worker, waiting to be executed::
  176. >>> from celery.task.control import broadcast
  177. >>> broadcast("dump_reserved", reply=True)
  178. [{'myworker1': [<TaskWrapper ....>]}]
  179. * New remote control command: ``dump_schedule``
  180. Dumps the workers currently registered ETA schedule.
  181. These are tasks with an ``eta`` (or ``countdown``) argument
  182. waiting to be executed by the worker.
  183. >>> from celery.task.control import broadcast
  184. >>> broadcast("dump_schedule", reply=True)
  185. [{'w1': []},
  186. {'w3': []},
  187. {'w2': ['0. 2010-05-12 11:06:00 pri0 <TaskWrapper:
  188. {name:"opalfeeds.tasks.refresh_feed_slice",
  189. id:"95b45760-4e73-4ce8-8eac-f100aa80273a",
  190. args:"(<Feeds freq_max:3600 freq_min:60
  191. start:2184.0 stop:3276.0>,)",
  192. kwargs:"{'page': 2}"}>']},
  193. {'w4': ['0. 2010-05-12 11:00:00 pri0 <TaskWrapper:
  194. {name:"opalfeeds.tasks.refresh_feed_slice",
  195. id:"c053480b-58fb-422f-ae68-8d30a464edfe",
  196. args:"(<Feeds freq_max:3600 freq_min:60
  197. start:1092.0 stop:2184.0>,)",
  198. kwargs:"{\'page\': 1}"}>',
  199. '1. 2010-05-12 11:12:00 pri0 <TaskWrapper:
  200. {name:"opalfeeds.tasks.refresh_feed_slice",
  201. id:"ab8bc59e-6cf8-44b8-88d0-f1af57789758",
  202. args:"(<Feeds freq_max:3600 freq_min:60
  203. start:3276.0 stop:4365>,)",
  204. kwargs:"{\'page\': 3}"}>']}]
  205. Fixes
  206. -----
  207. * Mediator thread no longer blocks for more than 1 second.
  208. With rate limits enabled and when there was a lot of remaining time,
  209. the mediator thread could block shutdown (and potentially block other
  210. jobs from coming in).
  211. * Remote rate limits was not properly applied
  212. (http://github.com/ask/celery/issues/issue/98)
  213. * Now handles exceptions with unicode messages correctly in
  214. ``TaskWrapper.on_failure``.
  215. * Database backend: ``TaskMeta.result``: default value should be ``None``
  216. not empty string.
  217. 1.0.2 [2010-03-31 12:50 P.M CET]
  218. ================================
  219. * Deprecated: ``CELERY_BACKEND``, please use ``CELERY_RESULT_BACKEND``
  220. instead.
  221. * We now use a custom logger in tasks. This logger supports task magic
  222. keyword arguments in formats.
  223. The default format for tasks (``CELERYD_TASK_LOG_FORMAT``) now includes
  224. the id and the name of tasks so the origin of task log messages can
  225. easily be traced.
  226. Example output::
  227. [2010-03-25 13:11:20,317: INFO/PoolWorker-1]
  228. [tasks.add(a6e1c5ad-60d9-42a0-8b24-9e39363125a4)] Hello from add
  229. To revert to the previous behavior you can set::
  230. CELERYD_TASK_LOG_FORMAT = """
  231. [%(asctime)s: %(levelname)s/%(processName)s] %(message)s
  232. """.strip()
  233. * Unittests: Don't disable the django test database teardown,
  234. instead fixed the underlying issue which was caused by modifications
  235. to the ``DATABASE_NAME`` setting (http://github.com/ask/celery/issues/82).
  236. * Django Loader: New config ``CELERY_DB_REUSE_MAX`` (max number of tasks
  237. to reuse the same database connection)
  238. The default is to use a new connection for every task.
  239. We would very much like to reuse the connection, but a safe number of
  240. reuses is not known, and we don't have any way to handle the errors
  241. that might happen, which may even be database dependent.
  242. See: http://bit.ly/94fwdd
  243. * celeryd: The worker components are now configurable: ``CELERYD_POOL``,
  244. ``CELERYD_LISTENER``, ``CELERYD_MEDIATOR``, and ``CELERYD_ETA_SCHEDULER``.
  245. The default configuration is as follows:
  246. .. code-block:: python
  247. CELERYD_POOL = "celery.worker.pool.TaskPool"
  248. CELERYD_MEDIATOR = "celery.worker.controllers.Mediator"
  249. CELERYD_ETA_SCHEDULER = "celery.worker.controllers.ScheduleController"
  250. CELERYD_LISTENER = "celery.worker.listener.CarrotListener"
  251. The ``CELERYD_POOL`` setting makes it easy to swap out the multiprocessing
  252. pool with a threaded pool, or how about a twisted/eventlet pool?
  253. Consider the competition for the first pool plug-in started!
  254. * Debian init scripts: Use ``-a`` not ``&&``
  255. (http://github.com/ask/celery/issues/82).
  256. * Debian init scripts: Now always preserves ``$CELERYD_OPTS`` from the
  257. ``/etc/default/celeryd`` and ``/etc/default/celerybeat``.
  258. * celery.beat.Scheduler: Fixed a bug where the schedule was not properly
  259. flushed to disk if the schedule had not been properly initialized.
  260. * celerybeat: Now syncs the schedule to disk when receiving the ``SIGTERM``
  261. and ``SIGINT`` signals.
  262. * Control commands: Make sure keywords arguments are not in unicode.
  263. * ETA scheduler: Was missing a logger object, so the scheduler crashed
  264. when trying to log that a task had been revoked.
  265. * management.commands.camqadm: Fixed typo ``camqpadm`` -> ``camqadm``
  266. (http://github.com/ask/celery/issues/83).
  267. * PeriodicTask.delta_resolution: Was not working for days and hours, now fixed
  268. by rounding to the nearest day/hour.
  269. * Fixed a potential infinite loop in ``BaseAsyncResult.__eq__``, although
  270. there is no evidence that it has ever been triggered.
  271. * celeryd: Now handles messages with encoding problems by acking them and
  272. emitting an error message.
  273. 1.0.1 [2010-02-24 07:05 P.M CET]
  274. ================================
  275. * Tasks are now acknowledged early instead of late.
  276. This is done because messages can only be acked within the same
  277. connection channel, so if the connection is lost we would have to refetch
  278. the message again to acknowledge it.
  279. This might or might not affect you, but mostly those running tasks with a
  280. really long execution time are affected, as all tasks that has made it
  281. all the way into the pool needs to be executed before the worker can
  282. safely terminate (this is at most the number of pool workers, multiplied
  283. by the ``CELERYD_PREFETCH_MULTIPLIER`` setting.)
  284. We multiply the prefetch count by default to increase the performance at
  285. times with bursts of tasks with a short execution time. If this doesn't
  286. apply to your use case, you should be able to set the prefetch multiplier
  287. to zero, without sacrificing performance.
  288. Please note that a patch to :mod:`multiprocessing` is currently being
  289. worked on, this patch would enable us to use a better solution, and is
  290. scheduled for inclusion in the ``1.2.0`` release.
  291. * celeryd now shutdowns cleanly when receving the ``TERM`` signal.
  292. * celeryd now does a cold shutdown if the ``INT`` signal is received (Ctrl+C),
  293. this means it tries to terminate as soon as possible.
  294. * Caching of results now moved to the base backend classes, so no need
  295. to implement this functionality in the base classes.
  296. * Caches are now also limited in size, so their memory usage doesn't grow
  297. out of control.
  298. You can set the maximum number of results the cache
  299. can hold using the ``CELERY_MAX_CACHED_RESULTS`` setting (the default
  300. is five thousand results). In addition, you can refetch already retrieved
  301. results using ``backend.reload_task_result`` +
  302. ``backend.reload_taskset_result`` (that's for those who want to send
  303. results incrementally).
  304. * ``celeryd`` now works on Windows again.
  305. Note that if running with Django,
  306. you can't use ``project.settings`` as the settings module name, but the
  307. following should work::
  308. $ python manage.py celeryd --settings=settings
  309. * Execution: ``.messaging.TaskPublisher.send_task`` now
  310. incorporates all the functionality apply_async previously did.
  311. Like converting countdowns to eta, so :func:`celery.execute.apply_async` is
  312. now simply a convenient front-end to
  313. :meth:`celery.messaging.TaskPublisher.send_task`, using
  314. the task classes default options.
  315. Also :func:`celery.execute.send_task` has been
  316. introduced, which can apply tasks using just the task name (useful
  317. if the client does not have the destination task in its task registry).
  318. Example:
  319. >>> from celery.execute import send_task
  320. >>> result = send_task("celery.ping", args=[], kwargs={})
  321. >>> result.get()
  322. 'pong'
  323. * ``camqadm``: This is a new utility for command line access to the AMQP API.
  324. Excellent for deleting queues/bindings/exchanges, experimentation and
  325. testing::
  326. $ camqadm
  327. 1> help
  328. Gives an interactive shell, type ``help`` for a list of commands.
  329. When using Django, use the management command instead::
  330. $ python manage.py camqadm
  331. 1> help
  332. * Redis result backend: To conform to recent Redis API changes, the following
  333. settings has been deprecated:
  334. * ``REDIS_TIMEOUT``
  335. * ``REDIS_CONNECT_RETRY``
  336. These will emit a ``DeprecationWarning`` if used.
  337. A ``REDIS_PASSWORD`` setting has been added, so you can use the new
  338. simple authentication mechanism in Redis.
  339. * The redis result backend no longer calls ``SAVE`` when disconnecting,
  340. as this is apparently better handled by Redis itself.
  341. * If ``settings.DEBUG`` is on, celeryd now warns about the possible
  342. memory leak it can result in.
  343. * The ETA scheduler now sleeps at most two seconds between iterations.
  344. * The ETA scheduler now deletes any revoked tasks it might encounter.
  345. As revokes are not yet persistent, this is done to make sure the task
  346. is revoked even though it's currently being hold because its eta is e.g.
  347. a week into the future.
  348. * The ``task_id`` argument is now respected even if the task is executed
  349. eagerly (either using apply, or ``CELERY_ALWAYS_EAGER``).
  350. * The internal queues are now cleared if the connection is reset.
  351. * New magic keyword argument: ``delivery_info``.
  352. Used by retry() to resend the task to its original destination using the same
  353. exchange/routing_key.
  354. * Events: Fields was not passed by ``.send()`` (fixes the uuid keyerrors
  355. in celerymon)
  356. * Added ``--schedule``/``-s`` option to celeryd, so it is possible to
  357. specify a custom schedule filename when using an embedded celerybeat
  358. server (the ``-B``/``--beat``) option.
  359. * Better Python 2.4 compatibility. The test suite now passes.
  360. * task decorators: Now preserve docstring as ``cls.__doc__``, (was previously
  361. copied to ``cls.run.__doc__``)
  362. * The ``testproj`` directory has been renamed to ``tests`` and we're now using
  363. ``nose`` + ``django-nose`` for test discovery, and ``unittest2`` for test
  364. cases.
  365. * New pip requirements files available in ``contrib/requirements``.
  366. * TaskPublisher: Declarations are now done once (per process).
  367. * Added ``Task.delivery_mode`` and the ``CELERY_DEFAULT_DELIVERY_MODE``
  368. setting.
  369. These can be used to mark messages non-persistent (i.e. so they are
  370. lost if the broker is restarted).
  371. * Now have our own ``ImproperlyConfigured`` exception, instead of using the
  372. Django one.
  373. * Improvements to the debian init scripts: Shows an error if the program is
  374. not executeable. Does not modify ``CELERYD`` when using django with
  375. virtualenv.
  376. 1.0.0 [2010-02-10 04:00 P.M CET]
  377. ================================
  378. BACKWARD INCOMPATIBLE CHANGES
  379. -----------------------------
  380. * Celery does not support detaching anymore, so you have to use the tools
  381. available on your platform, or something like supervisord to make
  382. celeryd/celerybeat/celerymon into background processes.
  383. We've had too many problems with celeryd daemonizing itself, so it was
  384. decided it has to be removed. Example startup scripts has been added to
  385. ``contrib/``:
  386. * Debian, Ubuntu, (start-stop-daemon)
  387. ``contrib/debian/init.d/celeryd``
  388. ``contrib/debian/init.d/celerybeat``
  389. * Mac OS X launchd
  390. ``contrib/mac/org.celeryq.celeryd.plist``
  391. ``contrib/mac/org.celeryq.celerybeat.plist``
  392. ``contrib/mac/org.celeryq.celerymon.plist``
  393. * Supervisord (http://supervisord.org)
  394. ``contrib/supervisord/supervisord.conf``
  395. In addition to ``--detach``, the following program arguments has been
  396. removed: ``--uid``, ``--gid``, ``--workdir``, ``--chroot``, ``--pidfile``,
  397. ``--umask``. All good daemonization tools should support equivalent
  398. functionality, so don't worry.
  399. Also the following configuration keys has been removed:
  400. ``CELERYD_PID_FILE``, ``CELERYBEAT_PID_FILE``, ``CELERYMON_PID_FILE``.
  401. * Default celeryd loglevel is now ``WARN``, to enable the previous log level
  402. start celeryd with ``--loglevel=INFO``.
  403. * Tasks are automatically registered.
  404. This means you no longer have to register your tasks manually.
  405. You don't have to change your old code right away, as it doesn't matter if
  406. a task is registered twice.
  407. If you don't want your task to be automatically registered you can set
  408. the ``abstract`` attribute
  409. .. code-block:: python
  410. class MyTask(Task):
  411. abstract = True
  412. By using ``abstract`` only tasks subclassing this task will be automatically
  413. registered (this works like the Django ORM).
  414. If you don't want subclasses to be registered either, you can set the
  415. ``autoregister`` attribute to ``False``.
  416. Incidentally, this change also fixes the problems with automatic name
  417. assignment and relative imports. So you also don't have to specify a task name
  418. anymore if you use relative imports.
  419. * You can no longer use regular functions as tasks.
  420. This change was added
  421. because it makes the internals a lot more clean and simple. However, you can
  422. now turn functions into tasks by using the ``@task`` decorator:
  423. .. code-block:: python
  424. from celery.decorators import task
  425. @task
  426. def add(x, y):
  427. return x + y
  428. See the User Guide: :doc:`userguide/tasks` for more information.
  429. * The periodic task system has been rewritten to a centralized solution.
  430. This means ``celeryd`` no longer schedules periodic tasks by default,
  431. but a new daemon has been introduced: ``celerybeat``.
  432. To launch the periodic task scheduler you have to run celerybeat::
  433. $ celerybeat
  434. Make sure this is running on one server only, if you run it twice, all
  435. periodic tasks will also be executed twice.
  436. If you only have one worker server you can embed it into celeryd like this::
  437. $ celeryd --beat # Embed celerybeat in celeryd.
  438. * The supervisor has been removed.
  439. This means the ``-S`` and ``--supervised`` options to ``celeryd`` is
  440. no longer supported. Please use something like http://supervisord.org
  441. instead.
  442. * ``TaskSet.join`` has been removed, use ``TaskSetResult.join`` instead.
  443. * The task status ``"DONE"`` has been renamed to `"SUCCESS"`.
  444. * ``AsyncResult.is_done`` has been removed, use ``AsyncResult.successful``
  445. instead.
  446. * The worker no longer stores errors if ``Task.ignore_result`` is set, to
  447. revert to the previous behaviour set
  448. ``CELERY_STORE_ERRORS_EVEN_IF_IGNORED`` to ``True``.
  449. * The staticstics functionality has been removed in favor of events,
  450. so the ``-S`` and ``--statistics`` switches has been removed.
  451. * The module ``celery.task.strategy`` has been removed.
  452. * ``celery.discovery`` has been removed, and it's ``autodiscover`` function is
  453. now in ``celery.loaders.djangoapp``. Reason: Internal API.
  454. * ``CELERY_LOADER`` now needs loader class name in addition to module name,
  455. E.g. where you previously had: ``"celery.loaders.default"``, you now need
  456. ``"celery.loaders.default.Loader"``, using the previous syntax will result
  457. in a DeprecationWarning.
  458. * Detecting the loader is now lazy, and so is not done when importing
  459. ``celery.loaders``.
  460. To make this happen ``celery.loaders.settings`` has
  461. been renamed to ``load_settings`` and is now a function returning the
  462. settings object. ``celery.loaders.current_loader`` is now also
  463. a function, returning the current loader.
  464. So::
  465. loader = current_loader
  466. needs to be changed to::
  467. loader = current_loader()
  468. DEPRECATIONS
  469. ------------
  470. * The following configuration variables has been renamed and will be
  471. deprecated in v1.2:
  472. * CELERYD_DAEMON_LOG_FORMAT -> CELERYD_LOG_FORMAT
  473. * CELERYD_DAEMON_LOG_LEVEL -> CELERYD_LOG_LEVEL
  474. * CELERY_AMQP_CONNECTION_TIMEOUT -> CELERY_BROKER_CONNECTION_TIMEOUT
  475. * CELERY_AMQP_CONNECTION_RETRY -> CELERY_BROKER_CONNECTION_RETRY
  476. * CELERY_AMQP_CONNECTION_MAX_RETRIES -> CELERY_BROKER_CONNECTION_MAX_RETRIES
  477. * SEND_CELERY_TASK_ERROR_EMAILS -> CELERY_SEND_TASK_ERROR_EMAILS
  478. * The public api names in celery.conf has also changed to a consistent naming
  479. scheme.
  480. * We now support consuming from an arbitrary number of queues.
  481. To do this we had to rename the configuration syntax. If you use any of
  482. the custom AMQP routing options (queue/exchange/routing_key, etc), you
  483. should read the new FAQ entry: http://bit.ly/aiWoH.
  484. The previous syntax is deprecated and scheduled for removal in v1.2.
  485. * ``TaskSet.run`` has been renamed to ``TaskSet.apply_async``.
  486. ``TaskSet.run`` has now been deprecated, and is scheduled for
  487. removal in v1.2.
  488. NEWS
  489. ----
  490. * Rate limiting support (per task type, or globally).
  491. * New periodic task system.
  492. * Automatic registration.
  493. * New cool task decorator syntax.
  494. * celeryd now sends events if enabled with the ``-E`` argument.
  495. Excellent for monitoring tools, one is already in the making
  496. (http://github.com/ask/celerymon).
  497. Current events include: worker-heartbeat,
  498. task-[received/succeeded/failed/retried],
  499. worker-online, worker-offline.
  500. * You can now delete (revoke) tasks that has already been applied.
  501. * You can now set the hostname celeryd identifies as using the ``--hostname``
  502. argument.
  503. * Cache backend now respects ``CELERY_TASK_RESULT_EXPIRES``.
  504. * Message format has been standardized and now uses ISO-8601 format
  505. for dates instead of datetime.
  506. * ``celeryd`` now responds to the ``HUP`` signal by restarting itself.
  507. * Periodic tasks are now scheduled on the clock.
  508. I.e. ``timedelta(hours=1)`` means every hour at :00 minutes, not every
  509. hour from the server starts. To revert to the previous behaviour you
  510. can set ``PeriodicTask.relative = True``.
  511. * Now supports passing execute options to a TaskSets list of args, e.g.:
  512. >>> ts = TaskSet(add, [([2, 2], {}, {"countdown": 1}),
  513. ... ([4, 4], {}, {"countdown": 2}),
  514. ... ([8, 8], {}, {"countdown": 3})])
  515. >>> ts.run()
  516. * Got a 3x performance gain by setting the prefetch count to four times the
  517. concurrency, (from an average task round-trip of 0.1s to 0.03s!).
  518. A new setting has been added: ``CELERYD_PREFETCH_MULTIPLIER``, which
  519. is set to ``4`` by default.
  520. * Improved support for webhook tasks.
  521. ``celery.task.rest`` is now deprecated, replaced with the new and shiny
  522. :mod:`celery.task.http`. With more reflective names, sensible interface,
  523. and it's possible to override the methods used to perform HTTP requests.
  524. * The results of tasksets are now cached by storing it in the result
  525. backend.
  526. CHANGES
  527. -------
  528. * Now depends on carrot >= 0.8.1
  529. * New dependencies: billiard, python-dateutil, django-picklefield
  530. * No longer depends on python-daemon
  531. * The ``uuid`` distribution is added as a dependency when running Python 2.4.
  532. * Now remembers the previously detected loader by keeping it in
  533. the ``CELERY_LOADER`` environment variable.
  534. This may help on windows where fork emulation is used.
  535. * ETA no longer sends datetime objects, but uses ISO 8601 date format in a
  536. string for better compatibility with other platforms.
  537. * No longer sends error mails for retried tasks.
  538. * Task can now override the backend used to store results.
  539. * Refactored the ExecuteWrapper, ``apply`` and ``CELERY_ALWAYS_EAGER`` now
  540. also executes the task callbacks and signals.
  541. * Now using a proper scheduler for the tasks with an ETA.
  542. This means waiting eta tasks are sorted by time, so we don't have
  543. to poll the whole list all the time.
  544. * Now also imports modules listed in CELERY_IMPORTS when running
  545. with django (as documented).
  546. * Loglevel for stdout/stderr changed from INFO to ERROR
  547. * ImportErrors are now properly propogated when autodiscovering tasks.
  548. * You can now use ``celery.messaging.establish_connection`` to establish a
  549. connection to the broker.
  550. * When running as a separate service the periodic task scheduler does some
  551. smart moves to not poll too regularly.
  552. If you need faster poll times you can lower the value
  553. of ``CELERYBEAT_MAX_LOOP_INTERVAL``.
  554. * You can now change periodic task intervals at runtime, by making
  555. ``run_every`` a property, or subclassing ``PeriodicTask.is_due``.
  556. * The worker now supports control commands enabled through the use of a
  557. broadcast queue, you can remotely revoke tasks or set the rate limit for
  558. a task type. See :mod:`celery.task.control`.
  559. * The services now sets informative process names (as shown in ``ps``
  560. listings) if the :mod:`setproctitle` module is installed.
  561. * :exc:`celery.exceptions.NotRegistered` now inherits from :exc:`KeyError`,
  562. and ``TaskRegistry.__getitem__``+``pop`` raises ``NotRegistered`` instead
  563. * You can set the loader via the ``CELERY_LOADER`` environment variable.
  564. * You can now set ``CELERY_IGNORE_RESULT`` to ignore task results by default
  565. (if enabled, tasks doesn't save results or errors to the backend used).
  566. * celeryd now correctly handles malformed messages by throwing away and
  567. acknowledging the message, instead of crashing.
  568. BUGS
  569. ----
  570. * Fixed a race condition that could happen while storing task results in the
  571. database.
  572. DOCUMENTATION
  573. -------------
  574. * Reference now split into two sections; API reference and internal module
  575. reference.
  576. 0.8.4 [2010-02-05 01:52 P.M CEST]
  577. ---------------------------------
  578. * Now emits a warning if the --detach argument is used.
  579. --detach should not be used anymore, as it has several not easily fixed
  580. bugs related to it. Instead, use something like start-stop-daemon,
  581. supervisord or launchd (os x).
  582. * Make sure logger class is process aware, even if running Python >= 2.6.
  583. * Error e-mails are not sent anymore when the task is retried.
  584. 0.8.3 [2009-12-22 09:43 A.M CEST]
  585. ---------------------------------
  586. * Fixed a possible race condition that could happen when storing/querying
  587. task results using the the database backend.
  588. * Now has console script entry points in the setup.py file, so tools like
  589. buildout will correctly install the programs celerybin and celeryinit.
  590. 0.8.2 [2009-11-20 03:40 P.M CEST]
  591. ---------------------------------
  592. * QOS Prefetch count was not applied properly, as it was set for every message
  593. received (which apparently behaves like, "receive one more"), instead of only
  594. set when our wanted value cahnged.
  595. 0.8.1 [2009-11-16 05:21 P.M CEST]
  596. =================================
  597. VERY IMPORTANT NOTE
  598. -------------------
  599. This release (with carrot 0.8.0) enables AMQP QoS (quality of service), which
  600. means the workers will only receive as many messages as it can handle at a
  601. time. As with any release, you should test this version upgrade on your
  602. development servers before rolling it out to production!
  603. IMPORTANT CHANGES
  604. -----------------
  605. * If you're using Python < 2.6 and you use the multiprocessing backport, then
  606. multiprocessing version 2.6.2.1 is required.
  607. * All AMQP_* settings has been renamed to BROKER_*, and in addition
  608. AMQP_SERVER has been renamed to BROKER_HOST, so before where you had::
  609. AMQP_SERVER = "localhost"
  610. AMQP_PORT = 5678
  611. AMQP_USER = "myuser"
  612. AMQP_PASSWORD = "mypassword"
  613. AMQP_VHOST = "celery"
  614. You need to change that to::
  615. BROKER_HOST = "localhost"
  616. BROKER_PORT = 5678
  617. BROKER_USER = "myuser"
  618. BROKER_PASSWORD = "mypassword"
  619. BROKER_VHOST = "celery"
  620. * Custom carrot backends now need to include the backend class name, so before
  621. where you had::
  622. CARROT_BACKEND = "mycustom.backend.module"
  623. you need to change it to::
  624. CARROT_BACKEND = "mycustom.backend.module.Backend"
  625. where ``Backend`` is the class name. This is probably ``"Backend"``, as
  626. that was the previously implied name.
  627. * New version requirement for carrot: 0.8.0
  628. CHANGES
  629. -------
  630. * Incorporated the multiprocessing backport patch that fixes the
  631. ``processName`` error.
  632. * Ignore the result of PeriodicTask's by default.
  633. * Added a Redis result store backend
  634. * Allow /etc/default/celeryd to define additional options for the celeryd init
  635. script.
  636. * MongoDB periodic tasks issue when using different time than UTC fixed.
  637. * Windows specific: Negate test for available os.fork (thanks miracle2k)
  638. * Now tried to handle broken PID files.
  639. * Added a Django test runner to contrib that sets CELERY_ALWAYS_EAGER = True for testing with the database backend
  640. * Added a CELERY_CACHE_BACKEND setting for using something other than the django-global cache backend.
  641. * Use custom implementation of functools.partial (curry) for Python 2.4 support
  642. (Probably still problems with running on 2.4, but it will eventually be
  643. supported)
  644. * Prepare exception to pickle when saving RETRY status for all backends.
  645. * SQLite no concurrency limit should only be effective if the db backend is used.
  646. 0.8.0 [2009-09-22 03:06 P.M CEST]
  647. =================================
  648. BACKWARD INCOMPATIBLE CHANGES
  649. -----------------------------
  650. * Add traceback to result value on failure.
  651. **NOTE** If you use the database backend you have to re-create the
  652. database table ``celery_taskmeta``.
  653. Contact the mailinglist or IRC channel listed in README for help
  654. doing this.
  655. * Database tables are now only created if the database backend is used,
  656. so if you change back to the database backend at some point,
  657. be sure to initialize tables (django: ``syncdb``, python: ``celeryinit``).
  658. (Note: This is only the case when using Django 1.1 or higher)
  659. * Now depends on ``carrot`` version 0.6.0.
  660. * Now depends on python-daemon 1.4.8
  661. IMPORTANT CHANGES
  662. -----------------
  663. * Celery can now be used in pure Python (outside of a Django project).
  664. This means celery is no longer Django specific.
  665. For more information see the FAQ entry
  666. `Can I use celery without Django?`_.
  667. .. _`Can I use celery without Django?`:
  668. http://ask.github.com/celery/faq.html#can-i-use-celery-without-django
  669. * Celery now supports task retries.
  670. See `Cookbook: Retrying Tasks`_ for more information.
  671. .. _`Cookbook: Retrying Tasks`:
  672. http://ask.github.com/celery/cookbook/task-retries.html
  673. * We now have an AMQP result store backend.
  674. It uses messages to publish task return value and status. And it's
  675. incredibly fast!
  676. See http://github.com/ask/celery/issues/closed#issue/6 for more info!
  677. * AMQP QoS (prefetch count) implemented:
  678. This to not receive more messages than we can handle.
  679. * Now redirects stdout/stderr to the celeryd logfile when detached
  680. * Now uses ``inspect.getargspec`` to only pass default arguments
  681. the task supports.
  682. * Add Task.on_success, .on_retry, .on_failure handlers
  683. See :meth:`celery.task.base.Task.on_success`,
  684. :meth:`celery.task.base.Task.on_retry`,
  685. :meth:`celery.task.base.Task.on_failure`,
  686. * ``celery.utils.gen_unique_id``: Workaround for
  687. http://bugs.python.org/issue4607
  688. * You can now customize what happens at worker start, at process init, etc
  689. by creating your own loaders. (see :mod:`celery.loaders.default`,
  690. :mod:`celery.loaders.djangoapp`, :mod:`celery.loaders`.)
  691. * Support for multiple AMQP exchanges and queues.
  692. This feature misses documentation and tests, so anyone interested
  693. is encouraged to improve this situation.
  694. * celeryd now survives a restart of the AMQP server!
  695. Automatically re-establish AMQP broker connection if it's lost.
  696. New settings:
  697. * AMQP_CONNECTION_RETRY
  698. Set to ``True`` to enable connection retries.
  699. * AMQP_CONNECTION_MAX_RETRIES.
  700. Maximum number of restarts before we give up. Default: ``100``.
  701. NEWS
  702. ----
  703. * Fix an incompatibility between python-daemon and multiprocessing,
  704. which resulted in the ``[Errno 10] No child processes`` problem when
  705. detaching.
  706. * Fixed a possible DjangoUnicodeDecodeError being raised when saving pickled
  707. data to Django's memcached cache backend.
  708. * Better Windows compatibility.
  709. * New version of the pickled field (taken from
  710. http://www.djangosnippets.org/snippets/513/)
  711. * New signals introduced: ``task_sent``, ``task_prerun`` and
  712. ``task_postrun``, see :mod:`celery.signals` for more information.
  713. * ``TaskSetResult.join`` caused ``TypeError`` when ``timeout=None``.
  714. Thanks Jerzy Kozera. Closes #31
  715. * ``views.apply`` should return ``HttpResponse`` instance.
  716. Thanks to Jerzy Kozera. Closes #32
  717. * ``PeriodicTask``: Save conversion of ``run_every`` from ``int``
  718. to ``timedelta`` to the class attribute instead of on the instance.
  719. * Exceptions has been moved to ``celery.exceptions``, but are still
  720. available in the previous module.
  721. * Try to rollback transaction and retry saving result if an error happens
  722. while setting task status with the database backend.
  723. * jail() refactored into :class:`celery.execute.ExecuteWrapper`.
  724. * ``views.apply`` now correctly sets mimetype to "application/json"
  725. * ``views.task_status`` now returns exception if status is RETRY
  726. * ``views.task_status`` now returns traceback if status is "FAILURE"
  727. or "RETRY"
  728. * Documented default task arguments.
  729. * Add a sensible __repr__ to ExceptionInfo for easier debugging
  730. * Fix documentation typo ``.. import map`` -> ``.. import dmap``.
  731. Thanks mikedizon
  732. 0.6.0 [2009-08-07 06:54 A.M CET]
  733. ================================
  734. IMPORTANT CHANGES
  735. -----------------
  736. * Fixed a bug where tasks raising unpickleable exceptions crashed pool
  737. workers. So if you've had pool workers mysteriously dissapearing, or
  738. problems with celeryd stopping working, this has been fixed in this
  739. version.
  740. * Fixed a race condition with periodic tasks.
  741. * The task pool is now supervised, so if a pool worker crashes,
  742. goes away or stops responding, it is automatically replaced with
  743. a new one.
  744. * Task.name is now automatically generated out of class module+name, e.g.
  745. ``"djangotwitter.tasks.UpdateStatusesTask"``. Very convenient. No idea why
  746. we didn't do this before. Some documentation is updated to not manually
  747. specify a task name.
  748. NEWS
  749. ----
  750. * Tested with Django 1.1
  751. * New Tutorial: Creating a click counter using carrot and celery
  752. * Database entries for periodic tasks are now created at ``celeryd``
  753. startup instead of for each check (which has been a forgotten TODO/XXX
  754. in the code for a long time)
  755. * New settings variable: ``CELERY_TASK_RESULT_EXPIRES``
  756. Time (in seconds, or a `datetime.timedelta` object) for when after
  757. stored task results are deleted. For the moment this only works for the
  758. database backend.
  759. * ``celeryd`` now emits a debug log message for which periodic tasks
  760. has been launched.
  761. * The periodic task table is now locked for reading while getting
  762. periodic task status. (MySQL only so far, seeking patches for other
  763. engines)
  764. * A lot more debugging information is now available by turning on the
  765. ``DEBUG`` loglevel (``--loglevel=DEBUG``).
  766. * Functions/methods with a timeout argument now works correctly.
  767. * New: ``celery.strategy.even_time_distribution``:
  768. With an iterator yielding task args, kwargs tuples, evenly distribute
  769. the processing of its tasks throughout the time window available.
  770. * Log message ``Unknown task ignored...`` now has loglevel ``ERROR``
  771. * Log message ``"Got task from broker"`` is now emitted for all tasks, even if
  772. the task has an ETA (estimated time of arrival). Also the message now
  773. includes the ETA for the task (if any).
  774. * Acknowledgement now happens in the pool callback. Can't do ack in the job
  775. target, as it's not pickleable (can't share AMQP connection, etc)).
  776. * Added note about .delay hanging in README
  777. * Tests now passing in Django 1.1
  778. * Fixed discovery to make sure app is in INSTALLED_APPS
  779. * Previously overrided pool behaviour (process reap, wait until pool worker
  780. available, etc.) is now handled by ``multiprocessing.Pool`` itself.
  781. * Convert statistics data to unicode for use as kwargs. Thanks Lucy!
  782. 0.4.1 [2009-07-02 01:42 P.M CET]
  783. ================================
  784. * Fixed a bug with parsing the message options (``mandatory``,
  785. ``routing_key``, ``priority``, ``immediate``)
  786. 0.4.0 [2009-07-01 07:29 P.M CET]
  787. ================================
  788. * Adds eager execution. ``celery.execute.apply``|``Task.apply`` executes the
  789. function blocking until the task is done, for API compatiblity it
  790. returns an ``celery.result.EagerResult`` instance. You can configure
  791. celery to always run tasks locally by setting the
  792. ``CELERY_ALWAYS_EAGER`` setting to ``True``.
  793. * Now depends on ``anyjson``.
  794. * 99% coverage using python ``coverage`` 3.0.
  795. 0.3.20 [2009-06-25 08:42 P.M CET]
  796. =================================
  797. * New arguments to ``apply_async`` (the advanced version of
  798. ``delay_task``), ``countdown`` and ``eta``;
  799. >>> # Run 10 seconds into the future.
  800. >>> res = apply_async(MyTask, countdown=10);
  801. >>> # Run 1 day from now
  802. >>> res = apply_async(MyTask, eta=datetime.now() +
  803. ... timedelta(days=1)
  804. * Now unlinks the pidfile if it's stale.
  805. * Lots of more tests.
  806. * Now compatible with carrot >= 0.5.0.
  807. * **IMPORTANT** The ``subtask_ids`` attribute on the ``TaskSetResult``
  808. instance has been removed. To get this information instead use:
  809. >>> subtask_ids = [subtask.task_id for subtask in ts_res.subtasks]
  810. * ``Taskset.run()`` now respects extra message options from the task class.
  811. * Task: Add attribute ``ignore_result``: Don't store the status and
  812. return value. This means you can't use the
  813. ``celery.result.AsyncResult`` to check if the task is
  814. done, or get its return value. Only use if you need the performance
  815. and is able live without these features. Any exceptions raised will
  816. store the return value/status as usual.
  817. * Task: Add attribute ``disable_error_emails`` to disable sending error
  818. emails for that task.
  819. * Should now work on Windows (although running in the background won't
  820. work, so using the ``--detach`` argument results in an exception
  821. being raised.)
  822. * Added support for statistics for profiling and monitoring.
  823. To start sending statistics start ``celeryd`` with the
  824. ``--statistics`` option. Then after a while you can dump the results
  825. by running ``python manage.py celerystats``. See
  826. ``celery.monitoring`` for more information.
  827. * The celery daemon can now be supervised (i.e it is automatically
  828. restarted if it crashes). To use this start celeryd with the
  829. ``--supervised`` option (or alternatively ``-S``).
  830. * views.apply: View applying a task. Example::
  831. http://e.com/celery/apply/task_name/arg1/arg2//?kwarg1=a&kwarg2=b
  832. **NOTE** Use with caution, preferably not make this publicly
  833. accessible without ensuring your code is safe!
  834. * Refactored ``celery.task``. It's now split into three modules:
  835. * celery.task
  836. Contains ``apply_async``, ``delay_task``, ``discard_all``, and task
  837. shortcuts, plus imports objects from ``celery.task.base`` and
  838. ``celery.task.builtins``
  839. * celery.task.base
  840. Contains task base classes: ``Task``, ``PeriodicTask``,
  841. ``TaskSet``, ``AsynchronousMapTask``, ``ExecuteRemoteTask``.
  842. * celery.task.builtins
  843. Built-in tasks: ``PingTask``, ``DeleteExpiredTaskMetaTask``.
  844. 0.3.7 [2008-06-16 11:41 P.M CET]
  845. --------------------------------
  846. * **IMPORTANT** Now uses AMQP's ``basic.consume`` instead of
  847. ``basic.get``. This means we're no longer polling the broker for
  848. new messages.
  849. * **IMPORTANT** Default concurrency limit is now set to the number of CPUs
  850. available on the system.
  851. * **IMPORTANT** ``tasks.register``: Renamed ``task_name`` argument to
  852. ``name``, so
  853. >>> tasks.register(func, task_name="mytask")
  854. has to be replaced with:
  855. >>> tasks.register(func, name="mytask")
  856. * The daemon now correctly runs if the pidlock is stale.
  857. * Now compatible with carrot 0.4.5
  858. * Default AMQP connnection timeout is now 4 seconds.
  859. * ``AsyncResult.read()`` was always returning ``True``.
  860. * Only use README as long_description if the file exists so easy_install
  861. doesn't break.
  862. * ``celery.view``: JSON responses now properly set its mime-type.
  863. * ``apply_async`` now has a ``connection`` keyword argument so you
  864. can re-use the same AMQP connection if you want to execute
  865. more than one task.
  866. * Handle failures in task_status view such that it won't throw 500s.
  867. * Fixed typo ``AMQP_SERVER`` in documentation to ``AMQP_HOST``.
  868. * Worker exception e-mails sent to admins now works properly.
  869. * No longer depends on ``django``, so installing ``celery`` won't affect
  870. the preferred Django version installed.
  871. * Now works with PostgreSQL (psycopg2) again by registering the
  872. ``PickledObject`` field.
  873. * ``celeryd``: Added ``--detach`` option as an alias to ``--daemon``, and
  874. it's the term used in the documentation from now on.
  875. * Make sure the pool and periodic task worker thread is terminated
  876. properly at exit. (So ``Ctrl-C`` works again).
  877. * Now depends on ``python-daemon``.
  878. * Removed dependency to ``simplejson``
  879. * Cache Backend: Re-establishes connection for every task process
  880. if the Django cache backend is memcached/libmemcached.
  881. * Tyrant Backend: Now re-establishes the connection for every task
  882. executed.
  883. 0.3.3 [2009-06-08 01:07 P.M CET]
  884. ================================
  885. * The ``PeriodicWorkController`` now sleeps for 1 second between checking
  886. for periodic tasks to execute.
  887. 0.3.2 [2009-06-08 01:07 P.M CET]
  888. ================================
  889. * celeryd: Added option ``--discard``: Discard (delete!) all waiting
  890. messages in the queue.
  891. * celeryd: The ``--wakeup-after`` option was not handled as a float.
  892. 0.3.1 [2009-06-08 01:07 P.M CET]
  893. ================================
  894. * The `PeriodicTask`` worker is now running in its own thread instead
  895. of blocking the ``TaskController`` loop.
  896. * Default ``QUEUE_WAKEUP_AFTER`` has been lowered to ``0.1`` (was ``0.3``)
  897. 0.3.0 [2009-06-08 12:41 P.M CET]
  898. ================================
  899. **NOTE** This is a development version, for the stable release, please
  900. see versions 0.2.x.
  901. **VERY IMPORTANT:** Pickle is now the encoder used for serializing task
  902. arguments, so be sure to flush your task queue before you upgrade.
  903. * **IMPORTANT** TaskSet.run() now returns a celery.result.TaskSetResult
  904. instance, which lets you inspect the status and return values of a
  905. taskset as it was a single entity.
  906. * **IMPORTANT** Celery now depends on carrot >= 0.4.1.
  907. * The celery daemon now sends task errors to the registered admin e-mails.
  908. To turn off this feature, set ``SEND_CELERY_TASK_ERROR_EMAILS`` to
  909. ``False`` in your ``settings.py``. Thanks to Grégoire Cachet.
  910. * You can now run the celery daemon by using ``manage.py``::
  911. $ python manage.py celeryd
  912. Thanks to Grégoire Cachet.
  913. * Added support for message priorities, topic exchanges, custom routing
  914. keys for tasks. This means we have introduced
  915. ``celery.task.apply_async``, a new way of executing tasks.
  916. You can use ``celery.task.delay`` and ``celery.Task.delay`` like usual, but
  917. if you want greater control over the message sent, you want
  918. ``celery.task.apply_async`` and ``celery.Task.apply_async``.
  919. This also means the AMQP configuration has changed. Some settings has
  920. been renamed, while others are new::
  921. CELERY_AMQP_EXCHANGE
  922. CELERY_AMQP_PUBLISHER_ROUTING_KEY
  923. CELERY_AMQP_CONSUMER_ROUTING_KEY
  924. CELERY_AMQP_CONSUMER_QUEUE
  925. CELERY_AMQP_EXCHANGE_TYPE
  926. See the entry `Can I send some tasks to only some servers?`_ in the
  927. `FAQ`_ for more information.
  928. .. _`Can I send some tasks to only some servers?`:
  929. http://bit.ly/celery_AMQP_routing
  930. .. _`FAQ`: http://ask.github.com/celery/faq.html
  931. * Task errors are now logged using loglevel ``ERROR`` instead of ``INFO``,
  932. and backtraces are dumped. Thanks to Grégoire Cachet.
  933. * Make every new worker process re-establish it's Django DB connection,
  934. this solving the "MySQL connection died?" exceptions.
  935. Thanks to Vitaly Babiy and Jirka Vejrazka.
  936. * **IMOPORTANT** Now using pickle to encode task arguments. This means you
  937. now can pass complex python objects to tasks as arguments.
  938. * Removed dependency to ``yadayada``.
  939. * Added a FAQ, see ``docs/faq.rst``.
  940. * Now converts any unicode keys in task ``kwargs`` to regular strings.
  941. Thanks Vitaly Babiy.
  942. * Renamed the ``TaskDaemon`` to ``WorkController``.
  943. * ``celery.datastructures.TaskProcessQueue`` is now renamed to
  944. ``celery.pool.TaskPool``.
  945. * The pool algorithm has been refactored for greater performance and
  946. stability.
  947. 0.2.0 [2009-05-20 05:14 P.M CET]
  948. ================================
  949. * Final release of 0.2.0
  950. * Compatible with carrot version 0.4.0.
  951. * Fixes some syntax errors related to fetching results
  952. from the database backend.
  953. 0.2.0-pre3 [2009-05-20 05:14 P.M CET]
  954. =====================================
  955. * *Internal release*. Improved handling of unpickled exceptions,
  956. ``get_result`` now tries to recreate something looking like the
  957. original exception.
  958. 0.2.0-pre2 [2009-05-20 01:56 P.M CET]
  959. =====================================
  960. * Now handles unpickleable exceptions (like the dynimically generated
  961. subclasses of ``django.core.exception.MultipleObjectsReturned``).
  962. 0.2.0-pre1 [2009-05-20 12:33 P.M CET]
  963. =====================================
  964. * It's getting quite stable, with a lot of new features, so bump
  965. version to 0.2. This is a pre-release.
  966. * ``celery.task.mark_as_read()`` and ``celery.task.mark_as_failure()`` has
  967. been removed. Use ``celery.backends.default_backend.mark_as_read()``,
  968. and ``celery.backends.default_backend.mark_as_failure()`` instead.
  969. 0.1.15 [2009-05-19 04:13 P.M CET]
  970. =================================
  971. * The celery daemon was leaking AMQP connections, this should be fixed,
  972. if you have any problems with too many files open (like ``emfile``
  973. errors in ``rabbit.log``, please contact us!
  974. 0.1.14 [2009-05-19 01:08 P.M CET]
  975. =================================
  976. * Fixed a syntax error in the ``TaskSet`` class. (No such variable
  977. ``TimeOutError``).
  978. 0.1.13 [2009-05-19 12:36 P.M CET]
  979. =================================
  980. * Forgot to add ``yadayada`` to install requirements.
  981. * Now deletes all expired task results, not just those marked as done.
  982. * Able to load the Tokyo Tyrant backend class without django
  983. configuration, can specify tyrant settings directly in the class
  984. constructor.
  985. * Improved API documentation
  986. * Now using the Sphinx documentation system, you can build
  987. the html documentation by doing ::
  988. $ cd docs
  989. $ make html
  990. and the result will be in ``docs/.build/html``.
  991. 0.1.12 [2009-05-18 04:38 P.M CET]
  992. =================================
  993. * ``delay_task()`` etc. now returns ``celery.task.AsyncResult`` object,
  994. which lets you check the result and any failure that might have
  995. happened. It kind of works like the ``multiprocessing.AsyncResult``
  996. class returned by ``multiprocessing.Pool.map_async``.
  997. * Added dmap() and dmap_async(). This works like the
  998. ``multiprocessing.Pool`` versions except they are tasks
  999. distributed to the celery server. Example:
  1000. >>> from celery.task import dmap
  1001. >>> import operator
  1002. >>> dmap(operator.add, [[2, 2], [4, 4], [8, 8]])
  1003. >>> [4, 8, 16]
  1004. >>> from celery.task import dmap_async
  1005. >>> import operator
  1006. >>> result = dmap_async(operator.add, [[2, 2], [4, 4], [8, 8]])
  1007. >>> result.ready()
  1008. False
  1009. >>> time.sleep(1)
  1010. >>> result.ready()
  1011. True
  1012. >>> result.result
  1013. [4, 8, 16]
  1014. * Refactored the task metadata cache and database backends, and added
  1015. a new backend for Tokyo Tyrant. You can set the backend in your django
  1016. settings file. e.g::
  1017. CELERY_RESULT_BACKEND = "database"; # Uses the database
  1018. CELERY_RESULT_BACKEND = "cache"; # Uses the django cache framework
  1019. CELERY_RESULT_BACKEND = "tyrant"; # Uses Tokyo Tyrant
  1020. TT_HOST = "localhost"; # Hostname for the Tokyo Tyrant server.
  1021. TT_PORT = 6657; # Port of the Tokyo Tyrant server.
  1022. 0.1.11 [2009-05-12 02:08 P.M CET]
  1023. =================================
  1024. * The logging system was leaking file descriptors, resulting in
  1025. servers stopping with the EMFILES (too many open files) error. (fixed)
  1026. 0.1.10 [2009-05-11 12:46 P.M CET]
  1027. =================================
  1028. * Tasks now supports both positional arguments and keyword arguments.
  1029. * Requires carrot 0.3.8.
  1030. * The daemon now tries to reconnect if the connection is lost.
  1031. 0.1.8 [2009-05-07 12:27 P.M CET]
  1032. ================================
  1033. * Better test coverage
  1034. * More documentation
  1035. * celeryd doesn't emit ``Queue is empty`` message if
  1036. ``settings.CELERYD_EMPTY_MSG_EMIT_EVERY`` is 0.
  1037. 0.1.7 [2009-04-30 1:50 P.M CET]
  1038. ===============================
  1039. * Added some unittests
  1040. * Can now use the database for task metadata (like if the task has
  1041. been executed or not). Set ``settings.CELERY_TASK_META``
  1042. * Can now run ``python setup.py test`` to run the unittests from
  1043. within the ``tests`` project.
  1044. * Can set the AMQP exchange/routing key/queue using
  1045. ``settings.CELERY_AMQP_EXCHANGE``, ``settings.CELERY_AMQP_ROUTING_KEY``,
  1046. and ``settings.CELERY_AMQP_CONSUMER_QUEUE``.
  1047. 0.1.6 [2009-04-28 2:13 P.M CET]
  1048. ===============================
  1049. * Introducing ``TaskSet``. A set of subtasks is executed and you can
  1050. find out how many, or if all them, are done (excellent for progress
  1051. bars and such)
  1052. * Now catches all exceptions when running ``Task.__call__``, so the
  1053. daemon doesn't die. This does't happen for pure functions yet, only
  1054. ``Task`` classes.
  1055. * ``autodiscover()`` now works with zipped eggs.
  1056. * celeryd: Now adds curernt working directory to ``sys.path`` for
  1057. convenience.
  1058. * The ``run_every`` attribute of ``PeriodicTask`` classes can now be a
  1059. ``datetime.timedelta()`` object.
  1060. * celeryd: You can now set the ``DJANGO_PROJECT_DIR`` variable
  1061. for ``celeryd`` and it will add that to ``sys.path`` for easy launching.
  1062. * Can now check if a task has been executed or not via HTTP.
  1063. * You can do this by including the celery ``urls.py`` into your project,
  1064. >>> url(r'^celery/$', include("celery.urls"))
  1065. then visiting the following url,::
  1066. http://mysite/celery/$task_id/done/
  1067. this will return a JSON dictionary like e.g:
  1068. >>> {"task": {"id": $task_id, "executed": true}}
  1069. * ``delay_task`` now returns string id, not ``uuid.UUID`` instance.
  1070. * Now has ``PeriodicTasks``, to have ``cron`` like functionality.
  1071. * Project changed name from ``crunchy`` to ``celery``. The details of
  1072. the name change request is in ``docs/name_change_request.txt``.
  1073. 0.1.0 [2009-04-24 11:28 A.M CET]
  1074. ================================
  1075. * Initial release