feat:非大内存模式下主动gc

This commit is contained in:
jxxghp
2025-06-27 09:44:47 +08:00
parent 0baf6e5fe7
commit bb4438ac42
5 changed files with 545 additions and 498 deletions
+6
View File
@@ -1,4 +1,5 @@
import base64
import gc
import re
from datetime import datetime
from typing import Optional, Tuple, Union, Dict
@@ -106,6 +107,11 @@ class SiteChain(ChainBase):
EventManager().send_event(EventType.SiteRefreshed, {
"site_id": "*"
})
# 如果不是大内存模式,进行垃圾回收
if not settings.BIG_MEMORY_MODE:
gc.collect()
return result
def is_special_site(self, domain: str) -> bool: