简单构建高并发

This commit is contained in:
2025-07-29 18:15:35 +08:00
commit c74eaf8836
11 changed files with 567 additions and 0 deletions

14
app/config.py Normal file
View File

@ -0,0 +1,14 @@
from pydantic import BaseModel
class Settings(BaseModel):
# PostgreSQL 数据库连接URL
# 格式: postgresql+asyncpg://user:password@host:port/database
DATABASE_URL: str = "postgresql+asyncpg://postgres:123456@localhost:5432/face_db"
# Milvus 连接信息 (将在第二阶段使用)
MILVUS_HOST: str = "localhost"
MILVUS_PORT: int = 19530
# 创建一个全局配置实例
settings = Settings()