(self)
| 890 | debug_logger.log_error(f"[PROTOCOL_REFRESH] Token {getattr(token, 'id', '?')}: 后台刷新异常 - {e}") |
| 891 | |
| 892 | async def _protocol_refresh_loop(self) -> None: |
| 893 | while True: |
| 894 | await asyncio.sleep(60) |
| 895 | try: |
| 896 | await self.run_protocol_refresh_once() |
| 897 | except asyncio.CancelledError: |
| 898 | raise |
| 899 | except Exception as e: |
| 900 | debug_logger.log_error(f"[PROTOCOL_REFRESH] 后台任务异常 - {e}") |
| 901 | |
| 902 | def start_protocol_refresher(self) -> None: |
| 903 | if self._protocol_refresher_task and not self._protocol_refresher_task.done(): |
no test coverage detected