Changelog 50 KB

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