()
| 157 | yield f"event: done\ndata: {safe_json_dumps(done_data)}\n\n" |
| 158 | except Exception as e: |
| 159 | logger.error(f"Streaming error: {e}", exc_info=True) |
| 160 | yield f"event: error\ndata: {safe_json_dumps({'error': str(e)})}\n\n" |
| 161 | |
| 162 | return Response(generate(), mimetype='text/event-stream', headers={ |
| 163 | 'Cache-Control': 'no-cache', |
| 164 | 'X-Accel-Buffering': 'no', |
| 165 | 'Connection': 'keep-alive', |
nothing calls this directly
no test coverage detected