Asynchronous Jobs
Brevia provides a built-in system to handle asynchronous jobs that can be particulary useful when dealing with long running tasks.
Internally these jobs are persistend in the async_jobs
table (see database for more details), while the background processes are handled using FastAPI Background Tasks.
Asynchronous jobs are used internally in analysis endpoints like /upload_summarize
and /upload_analyze
where files are uploaded and analyzed using built-in or custom services.
These endpoints will simply return a job id as response like this:
{"job": "7ca33644-5ddb-4747-84c0-8818715a65f8"}
After that you can:
- Check the async job status calling
GET /jobs/{uuid}
to retrieve the job results as it ends - List all jobs with optional filtering using
GET /jobs
to see all your async jobs with pagination and filtering capabilities
The /jobs
endpoint supports various filters such as completion status, service type, date ranges, and pagination parameters to help you manage and monitor your asynchronous tasks effectively.