Changelog 52 KB

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