Changelog 41 KB

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