From 627087797b315cb3ca0abdc03c1c021eed198fa1 Mon Sep 17 00:00:00 2001 From: 18610128193 <10574456+chenweiqiang-123@user.noreply.gitee.com> Date: Fri, 26 Jun 2026 18:19:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=91=8A=EF=BC=8C=E6=9C=AC=E5=9C=B0?= =?UTF-8?q?=E6=8E=A8=E9=83=BD=E6=98=AF=E7=94=A8=E5=B9=BF=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-api/.env | 5 +++-- video-gen-api/app/services/user_oauth_service.py | 6 +++--- video-gen-api/app/utils/redis.py | 2 +- 3 files changed, 7 insertions(+), 6 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/services/user_oauth_service.py b/video-gen-api/app/services/user_oauth_service.py index 3ae6ea18..9507c171 100644 --- a/video-gen-api/app/services/user_oauth_service.py +++ b/video-gen-api/app/services/user_oauth_service.py @@ -60,9 +60,9 @@ async def build_oauth_url(open_type: int, user_id: str, db: AsyncSession) -> str if open_type == 1: #千川 return await _build_jl_oauth_url(open_type, user_id, db) - elif open_type == 2: - #广告 - return await _build_jl_oauth_url(open_type, user_id, db) + elif open_type in [2, 3]: + #广告,本地推 + return await _build_jl_oauth_url(2, user_id, db) elif open_type == 5: #快手代理商 return "无配置" 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