mirror of
https://github.com/MeoProject/lx-music-api-server.git
synced 2025-05-23 19:17:41 +08:00
feat: 优化服务器停止时的逻辑
This commit is contained in:
parent
e999ebdf99
commit
9b5f48c915
10
main.py
10
main.py
@ -145,5 +145,11 @@ async def initMain():
|
||||
logger.info("Server stopped")
|
||||
|
||||
if __name__ == "__main__":
|
||||
start_checkcn_thread()
|
||||
asyncio.run(initMain())
|
||||
try:
|
||||
start_checkcn_thread()
|
||||
asyncio.run(initMain())
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except:
|
||||
logger.error('初始化出错,请检查日志')
|
||||
logger.error(traceback.format_exc())
|
Loading…
x
Reference in New Issue
Block a user