Revert "上传素材接口,增加3次请求"

This reverts commit 6be98fe3bf.
This commit is contained in:
18610128193
2026-06-26 11:19:39 +08:00
parent f7331a8b73
commit e431cb1caf
3 changed files with 5 additions and 8 deletions
+2 -3
View File
@@ -1,15 +1,14 @@
# App # App
APP_NAME=VideoGen API APP_NAME=VideoGen API
APP_VERSION=1.0.0 APP_VERSION=1.0.0
DEBUG=true DEBUG=false
SECRET_KEY=local-dev-secret-key-not-for-production SECRET_KEY=local-dev-secret-key-not-for-production
# Database (PostgreSQL) # Database (PostgreSQL)
#DATABASE_URL=postgresql+asyncpg://videogen_test:Yr7kM7kDj75izCiA@180.184.42.66:5432/videogen_test
DATABASE_URL=postgresql+asyncpg://videogen:7k33pnXdPL62Yyb4@180.184.42.66:5432/videogen DATABASE_URL=postgresql+asyncpg://videogen:7k33pnXdPL62Yyb4@180.184.42.66:5432/videogen
# Redis (leave empty to disable - rate limiting and captcha will use in-memory fallback) # Redis (leave empty to disable - rate limiting and captcha will use in-memory fallback)
REDIS_URL=redis://127.0.0.1:6379/0 REDIS_URL=redis://localhost:6379/3
CELERY_BROKER_URL=redis://localhost:6379/5 CELERY_BROKER_URL=redis://localhost:6379/5
CELERY_RESULT_BACKEND=redis://localhost:6379/6 CELERY_RESULT_BACKEND=redis://localhost:6379/6
+2 -4
View File
@@ -34,8 +34,7 @@ class DouyinApi:
oauth_id, oauth_id,
url, url,
'POST', 'POST',
options, options
request_count = 3
) )
#上传视频素材 #上传视频素材
@@ -53,8 +52,7 @@ class DouyinApi:
oauth_id, oauth_id,
url, url,
'POST', 'POST',
options, options
request_count = 3
) )
#获取区域信息 #获取区域信息
+1 -1
View File
@@ -9,7 +9,7 @@ async def init_redis() -> None:
return return
try: try:
from redis.asyncio import Redis from redis.asyncio import Redis
redis_client = Redis.from_url(settings.REDIS_URL, decode_responses=True, protocol=2) redis_client = Redis.from_url(settings.REDIS_URL, decode_responses=True)
await redis_client.ping() await redis_client.ping()
except Exception: except Exception:
redis_client = None redis_client = None