@@ -50,13 +50,11 @@ async def analyze_rotation(request: Request, req: AnalyzeRequest):
|
||||
{"type":"done"}
|
||||
"""
|
||||
repo = request.app.state.repo
|
||||
quote_service = getattr(request.app.state, "quote_service", None)
|
||||
depth_service = getattr(request.app.state, "depth_service", None)
|
||||
days = max(7, min(30, req.days))
|
||||
|
||||
async def stream_gen():
|
||||
async for chunk in analyze_rotation_stream(
|
||||
repo, days, req.focus, quote_service, depth_service,
|
||||
repo, days, req.focus,
|
||||
):
|
||||
yield chunk + "\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user