Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Django芹菜工作时间很长_Python_Django_Celery_Django Celery_Supervisord - Fatal编程技术网

Python Django芹菜工作时间很长

Python Django芹菜工作时间很长,python,django,celery,django-celery,supervisord,Python,Django,Celery,Django Celery,Supervisord,我用芹菜、芹菜和花 主管配置: command=/web/venv/bin/python manage.py celeryd-E-l info-c2--maxstasksparchild=1-Ofair directory=/web/ stdout_logfile=/web/log/ redirect_stderr=true user=web killasgroup=true stopasgroup=true 当从python外壳启动时,任务运行得非常快。如果是芹菜,效果很长很长。我不知道是什

我用芹菜、芹菜和花

主管配置:

command=/web/venv/bin/python manage.py celeryd-E-l info-c2--maxstasksparchild=1-Ofair

directory=/web/
stdout_logfile=/web/log/
redirect_stderr=true
user=web
killasgroup=true
stopasgroup=true

当从python外壳启动时,任务运行得非常快。如果是芹菜,效果很长很长。我不知道是什么问题。也许有人能帮上忙?

你可以通过从管理员那里添加芹菜来实现同样的效果,这可能是一个解决方案

http://www.yourhost.com/admin/djcelery/

在花费了太多时间之后,get的执行会超时吗?您使用哪个命令从shell运行?@ArunG,是的get timeout@AjayGupta比如:`from project.tasks import test_task test_task()`我想可能是与venv(VirtualNV)相关的东西吧!!这有什么帮助?芹菜可以工作,但有些任务可以工作很长时间,当我从shell手动运行任务进行测试时,它们可以工作得很快。在您的情况下,代码应该以相同的方式运行,除非其环境问题。核实一下。我不会从shell启动代码,而是创建一个api url调用并放置一个pdb和解决方案,我会尝试,但我会从shell运行任务,就像芹菜一样