mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 04:46:26 +00:00
- Added *.pyc and *.pyo to .gitignore to prevent compiled Python files from being tracked. - Improved docstrings in various modules, providing clearer descriptions of functions, parameters, and return values to enhance code readability and maintainability.
19 lines
468 B
Python
19 lines
468 B
Python
from app.config.path_conf import BANNER_FILE
|
|
from app.core.logger import log
|
|
|
|
|
|
def worship(env: str) -> None:
|
|
"""
|
|
读取并打印启动 Banner(优先 `banner.txt`,并附带当前环境名)。
|
|
|
|
参数:
|
|
- env (str): 当前运行环境标识。
|
|
|
|
返回:
|
|
- None
|
|
"""
|
|
if BANNER_FILE.exists():
|
|
banner = BANNER_FILE.read_text(encoding="utf-8")
|
|
banner = f"🚀 当前运行环境: {env}\n{banner}"
|
|
log.info(banner)
|