ed21ee11d2
CI/CD Pipeline / Check if frontend-only change (push) Has been cancelled
CI/CD Pipeline / Validate - Code Quality (push) Has been cancelled
CI/CD Pipeline / Validate - Type Check (mypy) (push) Has been cancelled
CI/CD Pipeline / Validate - Migration (alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / PR Build API Image (push) Has been cancelled
CI/CD Pipeline / PR Build Web Image (push) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
35 lines
1.1 KiB
Python
Executable File
35 lines
1.1 KiB
Python
Executable File
"""统一配置入口 — 整个项目的配置都从这里获取。
|
||
|
||
所有服务共享同一个配置包,消除重复定义和不一致。
|
||
|
||
用法:
|
||
from packages.config import get_api_settings, get_worker_settings, get_shared_settings
|
||
from packages.config import APISettings, WorkerSettings, SharedSettings
|
||
|
||
架构:
|
||
packages/config/
|
||
├── base.py # SharedSettings 基类 + 统一单例管理
|
||
├── api_settings.py # APISettings(API 特有配置)
|
||
└── worker_settings.py # WorkerSettings(Worker 特有配置)
|
||
"""
|
||
|
||
from packages.config.api_settings import APISettings, get_api_settings
|
||
from packages.config.base import (
|
||
SharedSettings,
|
||
get_cached_settings,
|
||
get_shared_settings,
|
||
reload_settings_cache,
|
||
)
|
||
from packages.config.worker_settings import WorkerSettings, get_worker_settings
|
||
|
||
__all__ = [
|
||
"SharedSettings",
|
||
"APISettings",
|
||
"WorkerSettings",
|
||
"get_shared_settings",
|
||
"get_api_settings",
|
||
"get_worker_settings",
|
||
"get_cached_settings",
|
||
"reload_settings_cache",
|
||
]
|