且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Celery任务功能-Web服务器与远程服务器

更新时间:2022-06-13 09:08:13

管理此问题的一种方法是将您的工作程序存储在django项目中.Django和celery相互配合,可让您在celery应用中使用django项目的一部分. http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html

One way to manage this is to store your workers in your django project. Django and celery play nice to each other allowing you to use parts of your django project in your celery app. http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html

部署此方法意味着您的Web应用程序将不使用与您的celery工人相关的模块,并且在您的celery机器上,您的django视图将永远不会被使用.通常,这只会导致大量未使用的django应用程序代码...

Deploying this would mean that your web application would not use the modules involved with your celery workers, and on your celery machine your django views and such would never be used. This usually only results in a couple of megs of unused django application code...