zhongxinghong / PKUAutoElective

北大选课网补退选阶段自动选课小工具
MIT License
664 stars 235 forks source link

长时间运行可能导致无法获取最新的课程情况 #47

Open uqeryq opened 3 years ago

uqeryq commented 3 years ago

Check List

Version / Environment

System infomation: Ubuntu 18.04 amd64 Python version: Python 3.6.9 AutoElective version: 4.0.1

Config

dual_degree = false
identity = bzx

[client]

supply_cancel_page = 2
refresh_interval = 2
random_deviation = 0.2
iaaa_client_timeout = 30
elective_client_timeout = 60
elective_client_pool_size = 3
login_loop_interval = 2
debug_print_request = false
debug_dump_request = true

[monitor]

host = 127.0.0.1
port = 7074

[course:ld]

name = 逻辑导论
class = 1
school = 哲学系

[course:xy]

name = 西方音乐欣赏
class = 1
school = 艺术学院

[mutex:mt0]

courses = ld,xy

Issue Description

What

2020年9月24日下午,逻辑导论从250人扩至280人,查看刷课机导出的日志显示依然只有250人; 结束程序后重新运行,观察到导出的日志变为280人。 推测可能与账号长时间未退出登录有关?

程序在阿里云上跑了2天左右;日志均有备份,但过于敏感就不放上来了,如果作者需要可以留个邮箱?

Console Log

Reproduce

zhongxinghong commented 3 years ago

日志不需要了,这个问题有几个人都给我反馈过,貌似选课网现在存在恶意缓存,这个问题我可能需要过几天加个补丁修一下

zhongxinghong commented 3 years ago

v5.0.1 里添加了自动重登的机制,默认是每 10 min 让 elective 的会话自动登出,然后重新登录。至于这样能不能改善这个问题,还需要进一步的测试 :)