我在Ubuntu EC2节点上有一个Django项目,我一直用它来设置使用Celery
的异步。
我正在关注http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-asynchronous-task-queue-for-django-using-celery-redis/以及文档。我也看了Run a celery worker in the background。和http://thomassileo.com/blog/2012/08/20/how-to-keep-celery-running-with-supervisor/
在/etc/supervisor/conf.d/tp-celery.conf中我有:
[program:tp-celery]
command=/home/ubuntu/projects/tp celery --app=tp.celery:app worker --loglevel=INFO
directory=/home/ubuntu/projects/tp
user=ubuntu
numprocs=1
stdout_logfile=/var/log/celery-worker.log
stderr_logfile=/var/log/celery-worker.log
autostart=true
autorestart=true
startsecs=10
现在我按照指示行事:
ubuntu@ip-172-31-22-65:~$ sudo supervisorctl reread
tp-celery: available
ubuntu@ip-172-31-22-65:~$ sudo supervisorctl update
tp-celery: added process group
ubuntu@ip-172-31-22-65:~$ sudo supervisorctl status tp-celery
tp-celery FATAL command at '/home/ubuntu/projects/tp' is a directory
我做错了什么?