MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / update_proxy_last_used

Function update_proxy_last_used

src/database/crud.py:623–631  ·  view source on GitHub ↗

更新代理最后使用时间

(db: Session, proxy_id: int)

Source from the content-addressed store, hash-verified

621
622
623def update_proxy_last_used(db: Session, proxy_id: int) -> bool:
624 """更新代理最后使用时间"""
625 db_proxy = get_proxy_by_id(db, proxy_id)
626 if not db_proxy:
627 return False
628
629 db_proxy.last_used = utcnow_naive()
630 db.commit()
631 return True
632
633
634def get_random_proxy(db: Session) -> Optional[Proxy]:

Callers

nothing calls this directly

Calls 2

get_proxy_by_idFunction · 0.85
utcnow_naiveFunction · 0.85

Tested by

no test coverage detected