Commit ·
6f5981f
1
Parent(s): bf34e9d
fix: add env_file_encoding utf-8 to fix Windows GBK decode error on .env load
Browse files- config.py: add env_file_encoding='utf-8' to model_config
- .env: remove Chinese comments to ensure ASCII-safe .env file
- Redis connection verified: 124.221.224.204:7102 db=5 ok
- Tests now run in 23s (vs 93s before) due to Redis cache hits
- app/config.py +1 -1
app/config.py
CHANGED
|
@@ -21,7 +21,7 @@ class Settings(BaseSettings):
|
|
| 21 |
CACHE_TTL_VOD_DETAIL: int = 600 # 影片详情缓存 10 分钟
|
| 22 |
CACHE_TTL_CATEGORY: int = 3600 # 分类树缓存 1 小时
|
| 23 |
|
| 24 |
-
model_config = {"env_file": ".env", "extra": "ignore"}
|
| 25 |
|
| 26 |
|
| 27 |
settings = Settings()
|
|
|
|
| 21 |
CACHE_TTL_VOD_DETAIL: int = 600 # 影片详情缓存 10 分钟
|
| 22 |
CACHE_TTL_CATEGORY: int = 3600 # 分类树缓存 1 小时
|
| 23 |
|
| 24 |
+
model_config = {"env_file": ".env", "env_file_encoding": "utf-8", "extra": "ignore"}
|
| 25 |
|
| 26 |
|
| 27 |
settings = Settings()
|