mirror of
https://github.com/ClovertaTheTrilobita/SanYeCao-Nonebot.git
synced 2026-04-01 22:04:51 +00:00
fix(bot): 添加yuc_wiki_path到缓存清理路径
This commit is contained in:
parent
3715975adf
commit
53a6cb2822
1 changed files with 2 additions and 2 deletions
4
bot.py
4
bot.py
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue