supervisorctl配置
[root@localhost apps]# cat /etc/supervisor/conf.d/command_analyzer_celery_*
[program:book]
command=/home/project/bookmanager/venv/bin/gunicorn -w 8 -b 0.0.0.0:8000 bookmanager.wsgi:application
directory=/home/project/bookmanager
autostart=true
autorestart=true
startretries=3
loglevel=error
redirect_stderr=true
stdout_logfile=/var/log/bookrunning.log
stdout_logfile_maxbytes=500MB
user=root
environment=DJANGO_SETTINGS_MODULE="bookmanager.prod",EMAIL="123@qq.com"
[program:command_analyzer_celery_worker] command=/home/alyzer/venv/bin/celery -A app worker --logfile /var/log/command_celery_worker.log --loglevel=info directory=/home/appd_analyzer/ autostart=true autorestart=true startretries=3 user=root stopasgroup=true killasgroup=true redirect_stderr=false stdout_logfile_maxbytes = 50MB stdout_logfile_backups = 20 stdout_logfile = /var/log/command_celery_worker.log