From 6be98fe3bf57a7d812ca6282dc661ade2d61b11b Mon Sep 17 00:00:00 2001 From: 18610128193 <10574456+chenweiqiang-123@user.noreply.gitee.com> Date: Fri, 26 Jun 2026 11:13:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E7=B4=A0=E6=9D=90=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=A2=9E=E5=8A=A03=E6=AC=A1=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-api/.env | 5 +++-- video-gen-api/app/utils/douyinApi.py | 6 ++++-- video-gen-api/app/utils/redis.py | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/video-gen-api/.env b/video-gen-api/.env index 783ade76..9eea60ef 100644 --- a/video-gen-api/.env +++ b/video-gen-api/.env @@ -1,14 +1,15 @@ # App APP_NAME=VideoGen API APP_VERSION=1.0.0 -DEBUG=false +DEBUG=true 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://localhost:6379/3 +REDIS_URL=redis://127.0.0.1:6379/0 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 3fbc53d6..b09212b4 100644 --- a/video-gen-api/app/utils/douyinApi.py +++ b/video-gen-api/app/utils/douyinApi.py @@ -34,7 +34,8 @@ class DouyinApi: oauth_id, url, 'POST', - options + options, + request_count = 3 ) #上传视频素材 @@ -52,7 +53,8 @@ class DouyinApi: oauth_id, url, 'POST', - options + options, + request_count = 3 ) #获取区域信息 diff --git a/video-gen-api/app/utils/redis.py b/video-gen-api/app/utils/redis.py index 13ffa65b..75d5fd68 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) + redis_client = Redis.from_url(settings.REDIS_URL, decode_responses=True, protocol=2) await redis_client.ping() except Exception: redis_client = None