changelog-1.0.rst 55 KB

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