(task_id: str)
| 119 | raise HTTPException(status_code=404, detail="Task not completed") |
| 120 | |
| 121 | save_result_path = task_status.get("save_result_path") |
| 122 | if not save_result_path: |
| 123 | raise HTTPException(status_code=404, detail="Task result file does not exist") |
| 124 | |
| 125 | full_path = Path(save_result_path) |
| 126 | if not full_path.is_absolute(): |
| 127 | full_path = services.file_service.output_video_dir / save_result_path |
| 128 | |
| 129 | return _stream_file_response(full_path) |
| 130 | |
| 131 | except HTTPException: |
| 132 | raise |
| 133 | except Exception as e: |
| 134 | logger.error(f"Error occurred while getting task result: {e}") |
| 135 | raise HTTPException(status_code=500, detail="Failed to get task result") |
| 136 |
nothing calls this directly
no test coverage detected