docs(gateway): 标注图目录改为 crontab 每日清理旧文案同步
app.py 启动日志与 reqlog 注释原写「永久保留,不自动清理」,实际已配置 crontab 每天 03:00 清理 static/annotations 超过 30 天的文件
This commit is contained in:
+2
-2
@@ -65,10 +65,10 @@ async def lifespan(app: FastAPI):
|
||||
else:
|
||||
app.state._pool_shutdown = None
|
||||
|
||||
# 确保标注图目录存在(永久保留,不做定期清理)
|
||||
# 确保标注图目录存在(超过 30 天的文件由 crontab 每天 03:00 清理)
|
||||
static_dir = Path(cfg["static_dir"])
|
||||
static_dir.mkdir(parents=True, exist_ok=True)
|
||||
logger.info("标注图目录: %s(永久保留,不自动清理)", static_dir)
|
||||
logger.info("标注图目录: %s(>30 天文件由 crontab 每日清理)", static_dir)
|
||||
|
||||
yield
|
||||
|
||||
|
||||
Reference in New Issue
Block a user