使用特定的linux us运行celery

2024-09-30 20:25:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我在Django应用程序中使用芹菜。我正在使用特定的用户来运行应用程序。但我不能用特定于用户的django服务器运行django进程。它从根用户开始芹菜。所以,我不能使用该用户配置文件中的环境变量(~/.bashrc)。在

芹菜配置:

[program:celery_supervisor]
environment=PYTHONPATH=PYTHONPATH:/usr/local/koob/fireball/
direcotry=/usr/local/koob/fireball/
command=/usr/local/koob/fireball/env/bin/python /usr/local/koob/fireball/env/bin/celery -A fireball worker -l info
autostart=true
autorestart=true
user=deployer
stderr_logfile=/usr/local/koob/fireball/celery.err.log
stdout_logfile=/usr/local/koob/fireball/celery.out.log

django配置:

^{pr2}$

Tags: django用户envlogtrue应用程序binusr