Certain GQL operations, such as schema dropping, projection creation, and algorithm writeback, are designed to run as back-end jobs. The results of some jobs, such as files generated by algorithms, are stored in the graphs on which they are executed and can be retrieved later, unless cleared.
To retrieve all jobs in the current graph:
GQLSHOW JOB
To retrieve the job with id 83 in the current graph:
GQLSHOW JOB 83
It returns the following information for each job:
Field | Description |
|---|---|
job_id | Job ID. Some jobs have sub-jobs with ids <jobId>_1,<jobId>_2, and so on. |
graph_name | The graph on which the job executes. |
type | Job type, such as CREATE_INDEX, CACHE, COMPACT etc. |
query | Query of the job. |
status | Job status, which can be FINISHED, RUNNING, STOPPING, STOPPED or FAILED. |
err_msg | Error message, if any, encountered during the job's execution. |
result | Results generated by the job, such as output files or statistical summaries from an algorithm. |
start_time | Start time of the job. |
end_time | End time of the job. |
progress | Progress updates for the job, such as indications that the write operation has been started. |
To stop the running job with id 83 in the current graph:
GQLSTOP JOB 83
NOTECertain job types cannot be stopped once they are running. These include
COMPACT,CREATE_INDEX,CREATE_FULLTEXT,CREATE_CONSTRAINT,MIGRATION, andCREATE_BACKUP.
To delete all jobs in the current graph that are not running:
GQLDELETE JOB *
To delete the job with ID 83 in the current graph:
GQLDELETE JOB 83