Skip to main content

files.job_status

Poll file upload or file delete job progress. Same endpoint for upload (job_type: file_ingest) and delete (job_type: file_delete).
client.files.job_status(namespace_name: str, job_id: str) -> dict[str, Any]
API: GET /namespaces/{namespace_name}/file-jobs/{job_id} — see File job status

Examples

from moorcheh import MoorchehClient

with MoorchehClient("http://localhost:8080") as client:
    job = client.files.job_status("my-documents", job_id)
    if job["job_type"] == "file_ingest":
        print(job["chunks_processed"], "/", job["chunks_total"])
    elif job["job_type"] == "file_delete":
        print("deleted", job["items_deleted"])