mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
refactor: unify capability shutdown convergence
This commit is contained in:
@@ -247,8 +247,9 @@ class HostModuleAdapter:
|
||||
@staticmethod
|
||||
def stop(spec: CapabilitySpec, instance: Any, generation: int) -> None:
|
||||
"""停止实例拥有的资源;Runtime 会先撤销其运行态可见性。"""
|
||||
del spec, generation
|
||||
instance.stop()
|
||||
del generation
|
||||
if instance.stop() is False:
|
||||
raise RuntimeError(f"Host Module {spec.id} 资源未完成收口")
|
||||
|
||||
@staticmethod
|
||||
def cleanup(
|
||||
|
||||
Reference in New Issue
Block a user