Understanding Jobs
Learn how the platform uses asynchronous jobs to perform intensive tasks.
Asynchronous Processing
Certain operations in the Perseus service, such as building a knowledge graph or generating a new ontology from a document, can be resource-intensive and may take time to complete.
To ensure that the system remains responsive and your applications are not blocked, these tasks are performed asynchronously. When you initiate one of these operations, you are creating a Job.
What is a Job?
A Job is an object that represents and manages a long-running task. It allows you to track the progress of an operation from start to finish without having to wait for it to complete in real-time.
Both the SDK and the Console use jobs to handle graph and ontology building.
The Job Lifecycle
A job progresses through several statuses during its lifecycle, which you can monitor to understand its state. The primary statuses are:
PENDING: The job has been created and is waiting in a queue to be processed.RUNNING: The job is actively being processed by the engine.SUCCEEDED: The job has completed successfully, and the resulting artifact (a knowledge graph or ontology) is ready.FAILED: The job terminated due to an error.
By checking the status of a job, you can programmatically determine when your graph or ontology is ready for use.