fix(bot): 添加yuc_wiki_path到缓存清理路径

This commit is contained in:
SlyAimer 2025-03-26 19:44:52 +08:00
parent 3715975adf
commit 53a6cb2822

4
bot.py
View file

@ -7,7 +7,7 @@ from nonebot import logger
from nonebot.log import default_format from nonebot.log import default_format
from nonebot.adapters.qq import Adapter as QQAdapter from nonebot.adapters.qq import Adapter as QQAdapter
from apscheduler.schedulers.background import BackgroundScheduler from apscheduler.schedulers.background import BackgroundScheduler
from src.configs.path_config import log_path,temp_path,video_path from src.configs.path_config import log_path,temp_path,video_path,yuc_wiki_path
nonebot.init() nonebot.init()
driver = nonebot.get_driver() driver = nonebot.get_driver()
@ -21,7 +21,7 @@ driver.on_shutdown(disconnect)
def clean_temp_cache(): def clean_temp_cache():
"""定时清理缓存文件""" """定时清理缓存文件"""
path_list = [Path(temp_path), Path(video_path)] path_list = [Path(temp_path), Path(video_path),Path(yuc_wiki_path)]
print("开始清理文件") print("开始清理文件")
for folder_path in path_list: for folder_path in path_list:
files = get_files_in_folder(folder_path) files = get_files_in_folder(folder_path)