(self)
| 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() |
no test coverage detected