在Debian production server上以不能在项目目录中写入的用户运行Celery with Django,但在初始化celery节拍时需要创建文件来存储pid (celerybeat.pid)。
> File
> "/webapps/bookingsoft2016/lib/python3.5/site-packages/celery/platforms.py",
> line 213, in write_pid
> pidfile_fd = os.open(self.path, PIDFILE_FLAGS, PIDFILE_MODE) celery.platforms.LockFailed: [Errno 13] Permission denied:
> '/path_to_project/celerybeat.pid'如何更改文件位置?
--pidfile=/var/run/celery/celerybeat.pid - doesn't seems to work或任何其他解决方案来避免这种情况?
谢谢
发布于 2017-02-11 10:10:02
你有没有试过解除记忆?
编辑文件/etc/default/celeryd:并设置CELERYD_PID_FILE="/var/run/celery/celerybeat.pid"
您可以在此处找到更详细的文档,celery deamonizing示例配置
1:http://docs.celeryproject.org/en/latest/userguide/daemonizing.html#example-configuration
我希望这能有所帮助:-)
https://stackoverflow.com/questions/42170711
复制相似问题