Refine seller store implementation
This commit is contained in:
@@ -53,12 +53,35 @@ class Settings(BaseSettings):
|
||||
# 单张图片在后端需要解码/加水印,限制单文件可避免一次请求耗尽内存。
|
||||
image_upload_max_bytes: int = 20 * 1024 * 1024
|
||||
image_download_max_bytes: int = 20 * 1024 * 1024
|
||||
# 图片解码前依据真实宽高限制像素,避免超大图耗尽 Pillow/水印处理内存。
|
||||
image_max_pixels: int = 40_000_000
|
||||
# 远程图片下载防护:连接/读写/总耗时分别受控;重定向逐跳校验目标地址。
|
||||
image_download_connect_timeout: float = 10.0
|
||||
image_download_read_timeout: float = 30.0
|
||||
image_download_total_timeout: float = 60.0
|
||||
image_download_max_redirects: int = 3
|
||||
collection_max_images: int = 100
|
||||
export_max_images: int = 50
|
||||
export_zip_max_bytes: int = 200 * 1024 * 1024
|
||||
# ZIP 超过该值自动落临时磁盘,不继续占用进程内存。
|
||||
export_zip_memory_threshold_bytes: int = 2 * 1024 * 1024
|
||||
|
||||
# ── 商品轮播视频(FFmpeg)──
|
||||
# Ubuntu 默认安装包会提供同名命令;容器或特殊路径可在 .env 覆盖。
|
||||
video_ffmpeg_path: str = "ffmpeg"
|
||||
video_ffprobe_path: str = "ffprobe"
|
||||
video_width: int = 810
|
||||
video_height: int = 1080
|
||||
video_fps: int = 30
|
||||
video_transition_seconds: float = 0.35
|
||||
video_crf: int = 22
|
||||
video_max_rate: str = "3M"
|
||||
video_buffer_size: str = "6M"
|
||||
video_max_bytes: int = 45 * 1024 * 1024
|
||||
video_max_duration_seconds: int = 180
|
||||
video_render_timeout_seconds: int = 120
|
||||
background_job_lease_seconds: int = 300
|
||||
|
||||
# ── V2.1 套图生图(provider 路由与 image-suite-studio 一致)──
|
||||
image_provider: str = "doubao" # 未知模型时的兜底 provider:doubao | tongyi | rightapi
|
||||
request_timeout: int = 300 # 单张生图请求超时(秒)
|
||||
|
||||
Reference in New Issue
Block a user