(self, platform_config: dict)
| 254 | platform.record_error(error_msg, tb_str) |
| 255 | |
| 256 | async def reload(self, platform_config: dict) -> None: |
| 257 | await self.terminate_platform(platform_config["id"]) |
| 258 | if platform_config["enable"]: |
| 259 | await self.load_platform(platform_config) |
| 260 | |
| 261 | # 和配置文件保持同步 |
| 262 | config_ids = [provider["id"] for provider in self.platforms_config] |
| 263 | for key in list(self._inst_map.keys()): |
| 264 | if key not in config_ids: |
| 265 | await self.terminate_platform(key) |
| 266 | |
| 267 | async def terminate_platform(self, platform_id: str) -> None: |
| 268 | if platform_id in self._inst_map: |
nothing calls this directly
no test coverage detected