火山引擎SMS API|celery容灾优化|生成模型引擎积分列表API
This commit is contained in:
@@ -29,12 +29,26 @@ class Settings(BaseSettings):
|
||||
ENCRYPTION_KEY: str = "changeme-32bytes-base64-key-here!!"
|
||||
|
||||
# SMS settings
|
||||
# 兼容旧字段:SMS_API_URL/SMS_API_KEY/SMS_SIGN_NAME/SMS_TEMPLATE_CODE 保留,
|
||||
# 新接入默认使用火山引擎短信 SDK。
|
||||
SMS_API_URL: str = ""
|
||||
SMS_API_KEY: str = ""
|
||||
SMS_SIGN_NAME: str = "VideoGen"
|
||||
SMS_TEMPLATE_CODE: str = "SMS_001"
|
||||
SMS_MOCK: bool = True
|
||||
|
||||
# 火山引擎短信配置。
|
||||
# SmsAccount=消息组ID,TemplateID=模板ID,Sign=短信签名内容。
|
||||
VOLC_SMS_ACCESS_KEY_ID: str = ""
|
||||
VOLC_SMS_SECRET_ACCESS_KEY: str = ""
|
||||
VOLC_SMS_ACCOUNT: str = ""
|
||||
VOLC_SMS_TEMPLATE_ID: str = ""
|
||||
VOLC_SMS_SIGN: str = ""
|
||||
SMS_CODE_LENGTH: int = 4
|
||||
SMS_CODE_TTL_SECONDS: int = 300
|
||||
SMS_SEND_INTERVAL_SECONDS: int = 60
|
||||
SMS_DAILY_LIMIT: int = 20
|
||||
|
||||
# Payment settings
|
||||
WECHAT_MCH_ID: str = ""
|
||||
WECHAT_API_KEY: str = ""
|
||||
@@ -95,6 +109,19 @@ class Settings(BaseSettings):
|
||||
CELERY_DB_POOL_TIMEOUT: int = 30
|
||||
CELERY_DB_POOL_RECYCLE: int = 1800
|
||||
|
||||
# Celery 图片/视频下载容灾配置。
|
||||
# Redis broker 下 priority=0 最高,priority=9 最低。
|
||||
DOWNLOAD_TASK_PRIORITY_NORMAL: int = 5
|
||||
DOWNLOAD_TASK_PRIORITY_RECOVER: int = 0
|
||||
DOWNLOAD_TASK_MAX_ATTEMPTS: int = 3
|
||||
DOWNLOAD_TASK_RETRY_BACKOFF_SECONDS: int = 30
|
||||
DOWNLOAD_TASK_LEASE_SECONDS: int = 10 * 60
|
||||
DOWNLOAD_TASK_QUEUE_TIMEOUT_SECONDS: int = 5 * 60
|
||||
DOWNLOAD_RECOVERY_BATCH_SIZE: int = 100
|
||||
DOWNLOAD_RECOVERY_STARTUP_DELAY_SECONDS: int = 3
|
||||
DOWNLOAD_ACTIVE_REDIS_HASH_KEY: str = "vg:celery:download:active"
|
||||
DOWNLOAD_ACTIVE_REDIS_ZSET_KEY: str = "vg:celery:download:active_index"
|
||||
|
||||
RESOURCE_SIGN_SECRET: str = "resource-signature-secret-key-for-API-authentication"
|
||||
RESOURCE_SIGN_EXPIRE_SECONDS: int = 60
|
||||
RESOURCE_SIGN_ARG_EXPIRE: str = "exp"
|
||||
|
||||
Reference in New Issue
Block a user