Spaces:
Sleeping
Sleeping
Tadeas Kosek
commited on
Commit
·
2ddc19d
1
Parent(s):
f1a7e59
revert depends removal
Browse files
interfaces/api/routes/job_routes.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
"""Job management API routes."""
|
| 2 |
-
from fastapi import APIRouter, HTTPException, Request, Path
|
| 3 |
from fastapi.responses import FileResponse
|
| 4 |
from typing import Any
|
| 5 |
|
|
@@ -18,8 +18,8 @@ router = APIRouter()
|
|
| 18 |
404: {"description": "Job not found"}
|
| 19 |
})
|
| 20 |
async def get_job_status(
|
| 21 |
-
|
| 22 |
-
|
| 23 |
):
|
| 24 |
"""Get the status of a background processing job."""
|
| 25 |
try:
|
|
@@ -55,8 +55,8 @@ async def get_job_status(
|
|
| 55 |
404: {"description": "Job not found"}
|
| 56 |
})
|
| 57 |
async def download_job_result(
|
| 58 |
-
|
| 59 |
-
|
| 60 |
):
|
| 61 |
"""Download the result of a completed job."""
|
| 62 |
try:
|
|
|
|
| 1 |
"""Job management API routes."""
|
| 2 |
+
from fastapi import APIRouter, Depends, HTTPException, Request, Path
|
| 3 |
from fastapi.responses import FileResponse
|
| 4 |
from typing import Any
|
| 5 |
|
|
|
|
| 18 |
404: {"description": "Job not found"}
|
| 19 |
})
|
| 20 |
async def get_job_status(
|
| 21 |
+
use_cases: UseCases,
|
| 22 |
+
job_id: str = Path(..., description="The job ID returned from the extraction endpoint")
|
| 23 |
):
|
| 24 |
"""Get the status of a background processing job."""
|
| 25 |
try:
|
|
|
|
| 55 |
404: {"description": "Job not found"}
|
| 56 |
})
|
| 57 |
async def download_job_result(
|
| 58 |
+
use_cases: UseCases,
|
| 59 |
+
job_id: str = Path(..., description="The job ID of the completed extraction")
|
| 60 |
):
|
| 61 |
"""Download the result of a completed job."""
|
| 62 |
try:
|