chore(chat): 增加临时表情缓存上限
This commit is contained in:
committed by
Furina-1013-create
parent
b4e83c448b
commit
68e1e1e046
@@ -326,7 +326,7 @@ async def clear_temp_emoji() -> None:
|
|||||||
if os.path.exists(need_clear):
|
if os.path.exists(need_clear):
|
||||||
files = os.listdir(need_clear)
|
files = os.listdir(need_clear)
|
||||||
# 如果文件数超过100就全部删除
|
# 如果文件数超过100就全部删除
|
||||||
if len(files) > 100:
|
if len(files) > 1000:
|
||||||
for filename in files:
|
for filename in files:
|
||||||
file_path = os.path.join(need_clear, filename)
|
file_path = os.path.join(need_clear, filename)
|
||||||
if os.path.isfile(file_path):
|
if os.path.isfile(file_path):
|
||||||
|
|||||||
Reference in New Issue
Block a user