Skip to content

代理池项目中setting.py文件相关配置 #62

Open
@Yu-Yv

Description

@Yu-Yv

不算bug,建议:
1.在项目setting.py文件中,看到声明了LOG_DIR日志存储路径参数,但未使用。
应新建出...\project\ProxyPool\logs文件夹,并在配置文件中修改:
logger.add(env.str('LOG_RUNTIME_FILE', 'runtime.log'), level='DEBUG', rotation='1 week', retention='20 days')
logger.add(env.str('LOG_ERROR_FILE', 'error.log'), level='ERROR', rotation='1 week')

修改为:
logger.add(env.str('LOG_RUNTIME_FILE', f'{LOG_DIR}/runtime.log'), level='DEBUG', rotation='1 week', retention='20 days')
logger.add(env.str('LOG_ERROR_FILE', f'{LOG_DIR}/error.log'), level='ERROR', rotation='1 week')

2.setting.py文件中ENABLE_TESTER, ENABLE_GETTER, ENABLE_SERVER开关参数若都为False时,运行run.py文件报错(try方法中finally还会报错),可修改scheduler.py文件。(此条有点杠精,可忽略)
开关参数配置

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions