gpt4 book ai didi

python - celery 与 djcelery

转载 作者:太空狗 更新时间:2023-10-29 21:13:13 26 4
gpt4 key购买 nike

在我的 django 项目上尝试设置 celery 时,我对这两个应用程序之间的差异感到困惑。

两者有什么区别?在网上阅读教程时,我看到它们都在使用,但我不确定哪个最适合我。看起来 djcelery 有点像 celery ,但为 django 量身定做?但是 celery 不需要包含在已安装的应用程序中,而 djcelery 需要。

谢谢

最佳答案

Django-celery 是一个为 django 提供 Celery 集成的项目,但不再需要它。

您不必再安装 django-celery。由于开箱即用地支持 3.1 版 django。

所以要安装 celery 你可以使用pip:

pip install -U Celery

这是来自 Celery First Steps with Django Tutorial 的注释

Note:

Previous versions of Celery required a separate library to work with Django, but since 3.1 this is no longer the case. Django is supported out of the box now so this document only contains a basic way to integrate Celery and Django. You will use the same API as non-Django users so it’s recommended that you read the First Steps with Celery tutorial first and come back to this tutorial. When you have a working example you can continue to the Next Steps guide.

关于python - celery 与 djcelery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12612450/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com