mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix(runtime): 收口调度与事件异步任务生命周期 (#6415)
This commit is contained in:
@@ -580,7 +580,7 @@ async def stop_modules():
|
||||
|
||||
await run_step("AI智能体", stop_agent)
|
||||
await run_step("模块", lambda: ModuleManager().shutdown())
|
||||
await run_step("事件消费", lambda: EventManager().stop())
|
||||
await run_step("事件消费", lambda: EventManager().stop_async())
|
||||
await run_step("浏览器会话", close_browser_sessions)
|
||||
await run_step("托管资源", stop_managed_resources)
|
||||
await run_step("DoH服务", lambda: DohHelper().shutdown())
|
||||
|
||||
@@ -16,7 +16,7 @@ def init_scheduler():
|
||||
|
||||
def stop_scheduler():
|
||||
"""
|
||||
停止定时器;生命周期事件循环中返回有限等待的兼容协程。
|
||||
停止定时器;生命周期事件循环中返回可等待的收口协程。
|
||||
"""
|
||||
scheduler = Scheduler()
|
||||
try:
|
||||
@@ -24,7 +24,7 @@ def stop_scheduler():
|
||||
except RuntimeError:
|
||||
scheduler.stop()
|
||||
return None
|
||||
return scheduler.async_stop()
|
||||
return scheduler.stop_async()
|
||||
|
||||
|
||||
def restart_scheduler():
|
||||
|
||||
Reference in New Issue
Block a user