更新代理最后使用时间
(db: Session, proxy_id: int)
| 621 | |
| 622 | |
| 623 | def 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 | |
| 634 | def get_random_proxy(db: Session) -> Optional[Proxy]: |
nothing calls this directly
no test coverage detected