From 7d417226e634d242d03b1d9e8771a05d246db900 Mon Sep 17 00:00:00 2001 From: chenpanliang <3245129380@qq.com> Date: Tue, 16 Dec 2025 15:40:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86=E7=94=A8=E6=88=B7=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E6=B5=81=E5=BC=8F=E5=93=8D=E5=BA=94=E7=9A=84=E7=AD=89?= =?UTF-8?q?=E5=BE=85=E6=97=B6=E9=97=B4=E4=BB=8E15=E7=A7=92=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=B030=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增加等待时间以避免过于频繁的请求导致服务器压力过大 --- src/routers/light.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routers/light.py b/src/routers/light.py index 8579c25..60739a3 100644 --- a/src/routers/light.py +++ b/src/routers/light.py @@ -121,6 +121,6 @@ async def stream_user_scripts(user_id: str, request: Request): yield f"data: {json_error}\n\n" # 6. 等待 15 秒 - await asyncio.sleep(15) + await asyncio.sleep(30) return StreamingResponse(event_generator(), media_type="text/event-stream")