问题
I have a Django project on an Ubuntu EC2 node, which I have been using to set up an asynchronous using Celery
.
I am following http://michal.karzynski.pl/blog/2014/05/18/setting-up-an-asynchronous-task-queue-for-django-using-celery-redis/ along with the docs. I've also looked at Run a celery worker in the background. and http://thomassileo.com/blog/2012/08/20/how-to-keep-celery-running-with-supervisor/
In /etc/supervisor/conf.d/tp-celery.conf I have:
[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
Now following directions I get:
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
what am I doing wrong?
来源:https://stackoverflow.com/questions/29377944/trouble-installing-supervisord-with-celery