[program:celery_worker] command=celery -A main worker -l INFO --concurrency 10 priority=999 ; the relative start priority (default 999) autostart=true ; start at supervisord start (default: true) autorestart=true ; retstart at unexpected quit (default: true) startsecs=10 ; number of secs prog must stay running (def. 10) startretries=3 ; max # of serial start failures (default 3) exitcodes=0,2 ; 'expected' exit codes for process (default 0,2) stopsignal=QUIT ; signal used to kill process (default TERM) stopwaitsecs=10 ; max num secs to wait before SIGKILL (default 10) user=root ; setuid to this UNIX account to run the program log_stdout=true log_stderr=true ; if true, log program stderr (def false) logfile=/tmp/echo_time.log logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB) logfile_backups=10 ; # of logfile backups (default 10) stdout_logfile_maxbytes=20MB ; stdout 日志文件大小, 默认 50MB stdout_logfile_backups=20 ; stdout 日志文件备份数 stdout_logfile=/tmp/echo_time.stdout.log
web界面操作
需要开启supervisord.conf注释掉的这4行:
1 2 3 4
[inet_http_server] ; inet (TCP) server disabled by default port=127.0.0.1:9001 ; ip_address:port specifier, *:port for all iface username=user ; default is no username (open server) password=123 ; default is no password (open server)