mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-08 08:57:09 +08:00
remove gc
This commit is contained in:
@@ -108,10 +108,6 @@ class SiteChain(ChainBase):
|
|||||||
"site_id": "*"
|
"site_id": "*"
|
||||||
})
|
})
|
||||||
|
|
||||||
# 如果不是大内存模式,进行垃圾回收
|
|
||||||
if not settings.BIG_MEMORY_MODE:
|
|
||||||
gc.collect()
|
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def is_special_site(self, domain: str) -> bool:
|
def is_special_site(self, domain: str) -> bool:
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import copy
|
import copy
|
||||||
import gc
|
|
||||||
import json
|
import json
|
||||||
import random
|
import random
|
||||||
import threading
|
import threading
|
||||||
@@ -451,10 +450,6 @@ class SubscribeChain(ChainBase):
|
|||||||
self._rlock.release()
|
self._rlock.release()
|
||||||
logger.debug(f"search Lock released at {datetime.now()}")
|
logger.debug(f"search Lock released at {datetime.now()}")
|
||||||
|
|
||||||
# 如果不是大内存模式,进行垃圾回收
|
|
||||||
if not settings.BIG_MEMORY_MODE:
|
|
||||||
gc.collect()
|
|
||||||
|
|
||||||
def update_subscribe_priority(self, subscribe: Subscribe, meta: MetaBase,
|
def update_subscribe_priority(self, subscribe: Subscribe, meta: MetaBase,
|
||||||
mediainfo: MediaInfo, downloads: Optional[List[Context]]):
|
mediainfo: MediaInfo, downloads: Optional[List[Context]]):
|
||||||
"""
|
"""
|
||||||
@@ -526,9 +521,6 @@ class SubscribeChain(ChainBase):
|
|||||||
self.match(
|
self.match(
|
||||||
TorrentsChain().refresh(sites=sites)
|
TorrentsChain().refresh(sites=sites)
|
||||||
)
|
)
|
||||||
# 如果不是大内存模式,进行垃圾回收
|
|
||||||
if not settings.BIG_MEMORY_MODE:
|
|
||||||
gc.collect()
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_sub_sites(subscribe: Subscribe) -> List[int]:
|
def get_sub_sites(subscribe: Subscribe) -> List[int]:
|
||||||
@@ -829,7 +821,8 @@ class SubscribeChain(ChainBase):
|
|||||||
username=subscribe.username,
|
username=subscribe.username,
|
||||||
save_path=subscribe.save_path,
|
save_path=subscribe.save_path,
|
||||||
downloader=subscribe.downloader,
|
downloader=subscribe.downloader,
|
||||||
source=self.get_subscribe_source_keyword(subscribe)
|
source=self.get_subscribe_source_keyword(
|
||||||
|
subscribe)
|
||||||
)
|
)
|
||||||
|
|
||||||
# 同步外部修改,更新订阅信息
|
# 同步外部修改,更新订阅信息
|
||||||
|
|||||||
@@ -910,10 +910,6 @@ class TransferChain(ChainBase, metaclass=Singleton):
|
|||||||
torrents.clear()
|
torrents.clear()
|
||||||
del torrents
|
del torrents
|
||||||
|
|
||||||
# 如果不是大内存模式,进行垃圾回收
|
|
||||||
if not settings.BIG_MEMORY_MODE:
|
|
||||||
gc.collect()
|
|
||||||
|
|
||||||
# 结束
|
# 结束
|
||||||
logger.info("所有下载器中下载完成的文件已整理完成")
|
logger.info("所有下载器中下载完成的文件已整理完成")
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user