老姜果芹菜一体化项目。
django-celer的Python项目详细描述
寻找Django 1.11到2.2支持的赞助商https://github.com/celery/django-celery/issues/568
django芹菜-django芹菜集成
Version: | 3.3.1 |
---|---|
Web: | http://celeryproject.org/ |
Download: | http://pypi.python.org/pypi/django-celery/ |
Source: | http://github.com/celery/django-celery/ |
Keywords: | celery, task queue, job queue, asynchronous, rabbitmq, amqp, redis, python, django, webhooks, queue, distributed |
–
警告
仅当要使用django result backend时才需要此项目 和管理集成
请按照新教程进行操作:
http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html
django芹菜为django提供芹菜集成;使用django orm 和缓存后端以存储结果,自动发现任务模块 对于INSTALLED_APPS等中列出的应用程序。
使用django芹菜
要为项目启用django-celery,您需要将djcelery添加到 INSTALLED_APPS:
INSTALLED_APPS += ("djcelery", )
然后将以下行添加到您的settings.py:
import djcelery djcelery.setup_loader()
除了你之外,一切都和Celery User Manual中描述的一样 需要通过manage.py:
调用程序Program | Replace with |
---|---|
^{tt7}$ | ^{tt8}$ |
^{tt9}$ | ^{tt10}$ |
^{tt11}$ | ^{tt12}$ |
^{tt13}$ | ^{tt14}$ |
另一个主要区别是配置值存储在 Django项目“settings.py模块而不是 celeryconfig.py。
如果你是第一次尝试芹菜,你应该从阅读开始 Getting started with django-celery
mod_wsgi用户的特别注意事项
如果使用mod_wsgi来部署django应用程序,则需要 在.wsgi模块中包括以下内容:
import djcelery djcelery.setup_loader()
文件
Celery User Manual包含用户指南、教程和api 参考资料。它还有一个专用的subsection about the Django integration。
安装
您可以通过python包索引(pypi)安装django-celery。 或者来源。
使用pip,:
安装$ pip install django-celery
使用easy_install,:
安装$ easy_install django-celery
然后您需要创建必要的表。如果你产生 架构迁移,您需要运行:
$ python manage.py migrate djcelery
从源代码下载和安装
从下载最新版本的django-celery。 http://pypi.python.org/pypi/django-celery/
您可以通过执行以下操作安装它:
$ tar xvfz django-celery-0.0.0.tar.gz $ cd django-celery-0.0.0 # python setup.py install # as root
使用开发版本
您可以通过执行以下操作克隆git存储库:
$ git clone git://github.com/celery/django-celery.git
缺陷跟踪器
如果您有任何建议、错误报告或烦恼,请报告 我们的问题跟踪者在http://github.com/celery/django-celery/issues/
贡献
开发django-celery发生在github: http://github.com/celery/django-celery
我们非常鼓励您参与开发。 如果你不喜欢github(出于某种原因),不客气 发送常规补丁。
许可证
此软件是根据New BSD License授权的。请参阅LICENSE 文件位于顶级分发目录中,以获取完整的许可证文本。