fix: 清掉无用接口和样式,并收紧登录与工号边界
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user