fix: 清掉无用接口和样式,并收紧登录与工号边界

This commit is contained in:
2026-11-16 11:30:59 +08:00
parent 7381b49e4c
commit 5b83b7e415
15 changed files with 232 additions and 329 deletions
+1 -2
View File
@@ -165,7 +165,7 @@ def _cool_failed_sync(employee_id: str, *, invalid: bool = False) -> None:
with SessionLocal() as db:
sync = db.get(CourseSync, 1)
if sync is None:
sync = CourseSync(id=1, last_employee_id=employee_id, course_count=0)
sync = CourseSync(id=1, last_employee_id=employee_id)
db.add(sync)
sync.last_employee_id = employee_id
sync.next_allowed_at = datetime.now(timezone.utc) + timedelta(minutes=30)
@@ -231,7 +231,6 @@ def _fetch_and_store(trigger: str) -> bool:
sync.last_employee_id = employee_id
sync.finished_at = datetime.now(timezone.utc)
sync.next_allowed_at = sync.finished_at + next_gap()
sync.course_count = len(courses)
db.commit()
from euniv.autostudy import clear_study_hold, request_wake