MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _protocol_refresh_loop

Method _protocol_refresh_loop

src/services/token_manager.py:892–900  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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():

Callers 1

Calls 3

sleepMethod · 0.80
log_errorMethod · 0.80

Tested by

no test coverage detected