windows 使用 supervisor
- 安装pip包
- 生成主conf文件
2.1 在对应的python环境的Scripts下,使用echo_supervisord_conf.exe > supervisord.conf, 可以指定路径,不指定则生成在该目录下 - 修改conf配置文件 打开 127.0.0.1:9001相关配置,并配置子.conf文件
- 启动 .\supervisord.exe -c .\supervisord.conf
日志报错,修改主conf配置文件路径
注意子配置文件ddirectory和command路径
[program:monitor_local]
command=C:\ProgramData\Anaconda3\envs\xxx\python.exe C:\Users\admin\Desktop\Work\xxx\localchrome_spider.py
directory=C:\ProgramData\Anaconda3\envs\xxx\
stopasgroup=true
killasgroup=true
user=admin
stdout_logfile=C:\Users\admin\Desktop\Work\supervisor\monitor_local.log
redirect_stderr=true
environment=MODE=default
先笼统写一下