This commit is contained in:
jxxghp
2023-08-04 16:14:52 +08:00
parent 99dcf96c7c
commit 541a8d725d
7 changed files with 9 additions and 26 deletions

View File

@ -1,4 +1,3 @@
import gc
from typing import Any
from app.chain.download import *
@ -316,9 +315,6 @@ 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):
@ -339,6 +335,5 @@ class MessageChain(ChainBase):
self.post_torrents_message(Notification(
channel=channel,
title=f"{title}】共找到{total}条相关资源请回复对应数字下载0: 自动选择 p: 上一页 n: 下一页)",
items=items,
userid=userid
), torrents=items)