INNER CODE UNIT · Python
stop
GraiaProject/Ariadne · src/graia/ariadne/app.py:317
def stop(cls):
"""计划停止 Ariadne"""
mgr = cls.launch_manager
mgr.status.exiting = True
if mgr.task_group is not None:
mgr.task_group.stop = True
task = mgr.task_group.blocking_task
if task and not task.done():
task.cancel()
@classmethod
def create(cls, typ: Type[T], reuse: bool = True) -> T:
"""利用 Ariadne 已有的信息协助创建实例.
Args:
cls (Type[T]): 需要创建的类.
reuse (bool, optional): 是否允许复用, 默认为 True.