我正在尝试在我的 django 应用程序中使用 celery,以便我可以运行一个后台进程,将 CSV 文件导入我的模型数据库之一。这在我运行 celery worker 的本地机器上运行良好,使用:
python manage.py celery worker --loglevel=info
和 RabbitMQ
rabbitmq-server
这是我推送到 dotcloud 后收到的错误
workers.0 celery.platforms.LockFailed: [Errno 13] Permission denied: '/celeryev.pid'
编辑:
supervisord.conf
[program:djcelery]
command = /home/dotcloud/env/bin/python /home/dotcloud/current/cellhelmet/manage.py celeryd -E -l info -c 2
stderr_logfile = /var/log/supervisor/%(program_name)s_error.log
stdout_logfile = /var/log/supervisor/%(program_name)s.log
[program:celerycam]
command = /home/dotcloud/env/bin/python /home/dotcloud/current/cellhelmet/manage.py celerycam
stderr_logfile = /var/log/supervisor/%(program_name)s_error.log
stdout_logfile = /var/log/supervisor/%(program_name)s.log