1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2026-03-30 10:39:45 +08:00

build: 调试

This commit is contained in:
涵曦
2024-12-18 21:36:14 +08:00
parent a510f9162e
commit b0dfb37d98
4 changed files with 24 additions and 18 deletions

View File

@@ -588,18 +588,11 @@ async def playlistdelmusic(data: PlayListMusicObj, Verifcation=Depends(verificat
async def updateversion(
version: str = "", lite: bool = True, Verifcation=Depends(verification)
):
ret = update_version(version, lite)
ret = await update_version(version, lite)
if ret != "OK":
return {"ret": ret}
proc = restart_xiaomusic()
async def check_proc():
# 等待子进程完成
exit_code = await proc.wait()
log.info(f"Restart completed with exit code {exit_code}")
asyncio.create_task(check_proc())
asyncio.create_task(restart_xiaomusic())
return {"ret": "OK"}