mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
refactor: bound async log writer shutdown
This commit is contained in:
@@ -582,7 +582,8 @@ async def lifespan(app: FastAPI):
|
||||
finally:
|
||||
try:
|
||||
# 日志最后关闭,确保其他组件的收尾信息已写入文件
|
||||
LoggerManager.shutdown()
|
||||
if LoggerManager.shutdown() is False:
|
||||
raise RuntimeError("日志写入资源未在关停预算内收敛")
|
||||
finally:
|
||||
if main_loop_owner is not None:
|
||||
global_vars.clear_loop(main_loop_owner)
|
||||
|
||||
Reference in New Issue
Block a user