fix:memory use

This commit is contained in:
jxxghp
2025-06-04 18:34:49 +08:00
parent 984f4731cd
commit 1424087d5a

View File

@@ -238,7 +238,11 @@ class IndexerModule(_ModuleBase):
cat=cat,
page=page)
return _spider.is_error, _spider.get_torrents()
try:
return _spider.is_error, _spider.get_torrents()
finally:
# 显式清理SiteSpider对象
del _spider
def refresh_torrents(self, site: dict,
keyword: Optional[str] = None, cat: Optional[str] = None, page: Optional[int] = 0) -> Optional[List[TorrentInfo]]: