diff --git a/video-gen-api/.env b/video-gen-api/.env index 9eea60ef..783ade76 100644 --- a/video-gen-api/.env +++ b/video-gen-api/.env @@ -1,15 +1,14 @@ # App APP_NAME=VideoGen API APP_VERSION=1.0.0 -DEBUG=true +DEBUG=false SECRET_KEY=local-dev-secret-key-not-for-production # 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 # 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_RESULT_BACKEND=redis://localhost:6379/6 diff --git a/video-gen-api/app/utils/douyinApi.py b/video-gen-api/app/utils/douyinApi.py index b09212b4..3fbc53d6 100644 --- a/video-gen-api/app/utils/douyinApi.py +++ b/video-gen-api/app/utils/douyinApi.py @@ -34,8 +34,7 @@ class DouyinApi: oauth_id, url, 'POST', - options, - request_count = 3 + options ) #上传视频素材 @@ -53,8 +52,7 @@ class DouyinApi: oauth_id, url, 'POST', - options, - request_count = 3 + options ) #获取区域信息 diff --git a/video-gen-api/app/utils/redis.py b/video-gen-api/app/utils/redis.py index 75d5fd68..13ffa65b 100644 --- a/video-gen-api/app/utils/redis.py +++ b/video-gen-api/app/utils/redis.py @@ -9,7 +9,7 @@ async def init_redis() -> None: return try: 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() except Exception: redis_client = None