MCPcopy Create free account
hub / github.com/ModelTC/LightX2V / stop_task

Function stop_task

lightx2v/server/api/tasks/common.py:121–133  ·  view source on GitHub ↗
(task_id: str)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

StopTaskResponseClass · 0.85
cancel_taskMethod · 0.80
infoMethod · 0.80
errorMethod · 0.80
is_availableMethod · 0.45

Tested by

no test coverage detected