changelog-1.0.rst 55 KB

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