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

Method run_loop

src/web/selfcheck_scheduler.py:144–157  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

142 return self._snapshot_locked()
143
144 async def run_loop(self) -> None:
145 logger.info("系统自检调度器启动")
146 self._append_log("info", "调度器已启动")
147 while True:
148 try:
149 await self._tick_once()
150 await asyncio.sleep(SELFCHECK_POLL_SECONDS)
151 except asyncio.CancelledError:
152 logger.info("系统自检调度器已停止")
153 self._append_log("info", "调度器已停止")
154 break
155 except Exception as exc:
156 logger.warning("系统自检调度器异常: %s", exc)
157 await asyncio.sleep(SELFCHECK_POLL_SECONDS)
158
159 async def _tick_once(self) -> None:
160 schedule = self._read_schedule()

Callers 1

lifespanFunction · 0.45

Calls 5

_append_logMethod · 0.95
_tick_onceMethod · 0.95
infoMethod · 0.80
sleepMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected