MCPcopy
hub / github.com/AstrBotDevs/AstrBot / main_async

Function main_async

main.py:199–216  ·  view source on GitHub ↗

主异步入口

(webui_dir_arg: str | None)

Source from the content-addressed store, hash-verified

197
198
199async def main_async(webui_dir_arg: str | None) -> None:
200 """主异步入口"""
201 # 检查仪表板文件
202 webui_dir = await check_dashboard_files(webui_dir_arg)
203 if webui_dir is None:
204 logger.warning(
205 "管理面板文件检查失败,WebUI 功能将不可用。"
206 "请检查网络连接或手动指定 --webui-dir 参数。"
207 )
208
209 db = db_helper
210
211 # 打印 logo
212 logger.info(logo_tmpl)
213
214 core_lifecycle = InitialLoader(db, log_broker)
215 core_lifecycle.webui_dir = webui_dir
216 await core_lifecycle.start()
217
218
219if __name__ == "__main__":

Callers 1

main.pyFile · 0.85

Calls 4

startMethod · 0.95
InitialLoaderClass · 0.90
check_dashboard_filesFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected