File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ async def _shutdown_resources():
158158async def lifespan (app : FastAPI ):
159159 """FastAPI application life cycle management"""
160160 import server
161- from server import queue_worker
161+ from api import queue_worker
162162 original_streams = (sys .stdout , sys .stderr )
163163 initial_stdout , initial_stderr = _setup_logging ()
164164 logger = server .logger
Original file line number Diff line number Diff line change @@ -205,11 +205,11 @@ async def non_streaming_disconnect_monitor():
205205
206206 try :
207207 if completion_event :
208- from server import RESPONSE_COMPLETION_TIMEOUT
208+ from config import RESPONSE_COMPLETION_TIMEOUT
209209 await asyncio .wait_for (completion_event .wait (), timeout = RESPONSE_COMPLETION_TIMEOUT / 1000 + 60 )
210210 logger .info (f'[{ req_id } ] (Worker) ✅ 流式生成器完成信号收到。客户端提前断开: { client_disconnected_early } ' )
211211 else :
212- from server import RESPONSE_COMPLETION_TIMEOUT
212+ from config import RESPONSE_COMPLETION_TIMEOUT
213213 await asyncio .wait_for (asyncio .shield (result_future ), timeout = RESPONSE_COMPLETION_TIMEOUT / 1000 + 60 )
214214 logger .info (f'[{ req_id } ] (Worker) ✅ 非流式处理完成。客户端提前断开: { client_disconnected_early } ' )
215215
Original file line number Diff line number Diff line change 1111from playwright .async_api import Page as AsyncPage , Browser as AsyncBrowser , Playwright as AsyncPlaywright
1212from config import *
1313from models import WebSocketConnectionManager
14- from api import create_app
14+ from api import create_app , queue_worker
1515
1616STREAM_QUEUE : Optional [multiprocessing .Queue ] = None
1717STREAM_PROCESS = None
You can’t perform that action at this time.
0 commit comments