This commit is contained in:
jxxghp
2023-08-01 08:10:13 +08:00
parent c902b6ab70
commit 43e1816444
3 changed files with 11 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
from typing import Any
import gc
from app.chain.download import *
from app.chain.media import MediaChain
from app.chain.search import SearchChain
@@ -312,6 +312,9 @@ class MessageChain(ChainBase):
userid=userid, total=len(medias))
# 保存缓存
self.save_cache(user_cache, self._cache_file)
# 主动回收内存
del user_cache
gc.collect()
def __post_medias_message(self, channel: MessageChannel,
title: str, items: list, userid: str, total: int):