fix 交互重启完发送消息,交互获取当前版本

This commit is contained in:
thsrite
2023-10-17 15:10:02 +08:00
parent 08e0df1abc
commit 0e92e9fc60
3 changed files with 115 additions and 2 deletions

View File

@ -65,6 +65,15 @@ class ChainBase(metaclass=ABCMeta):
del cache
gc.collect()
@staticmethod
def remove_cache(filename: str) -> None:
"""
删除本地缓存
"""
cache_path = settings.TEMP_PATH / filename
if cache_path.exists():
Path(cache_path).unlink()
def run_module(self, method: str, *args, **kwargs) -> Any:
"""
运行包含该方法的所有模块,然后返回结果