Files
FastapiAdmin/backend/app/utils/banner.py
T
zhangtao 1d54dca76c style: 统一代码格式和字符串引号使用
refactor: 优化代码结构和可读性

feat: 添加http_limit模块实现请求限制功能

fix: 修复异步任务中使用time.sleep的问题

chore: 更新依赖项并添加pytest测试框架

docs: 更新项目描述信息

perf: 优化Redis序列化方式使用JSON替代pickle

test: 添加测试相关配置和依赖
2026-01-17 20:07:25 +08:00

13 lines
356 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from app.config.path_conf import BANNER_FILE
from app.core.logger import log
def worship(env: str) -> None:
"""
获取项目启动Banner(优先读取 banner.txt
"""
if BANNER_FILE.exists():
banner = BANNER_FILE.read_text(encoding="utf-8")
banner = f"🚀 当前运行环境: {env}\n{banner}"
log.info(banner)