fix: 补齐审查清单里还没落地的交互和代理复测

This commit is contained in:
2026-11-16 16:17:31 +08:00
parent 58b3dedb2a
commit 50a8ae2e27
19 changed files with 444 additions and 192 deletions
+3 -3
View File
@@ -79,7 +79,7 @@ def list_users(db: Session) -> list[dict]:
"last_refresh_at": _iso_time(account.last_refresh_at),
"credential_valid": _optional_bool(account.credential_valid),
"month_hours": account.month_hours or "",
"monthly_target": int(account.monthly_target or 600),
"monthly_target": account.monthly_target if account.monthly_target is not None else 600,
"has_proxy": enabled(account),
"proxy": summary_of(account),
"study_start": start_label(account),
@@ -109,7 +109,7 @@ def _require(db: Session, employee_id: str) -> Account:
def check_employee(db: Session, employee_id: str) -> dict:
from euniv.proxy import bind_url, is_proxy_failure, url_of, uses_pool
from euniv.proxy_pool import MAX_SWITCHES, mark_failed
from euniv.proxy_pool import MAX_SWITCHES, retire_if_dead
account = _require(db, employee_id)
if not account.credential_cipher:
@@ -133,7 +133,7 @@ def check_employee(db: Session, employee_id: str) -> dict:
break
except Exception as exc:
if pooled and proxy and is_proxy_failure(exc):
mark_failed(employee_id, proxy, str(exc)[:200])
retire_if_dead(employee_id, proxy, str(exc)[:200])
client.close()
client = None
continue