ArangoDB's Jobs operations.
Every function takes the pool as its first argument and returns the decoded
response body. See Arangox.API.Client for the options they all accept and
for what a 404 returns.
Summary
Functions
Cancel an async job
Cancel an async job. Raises on error.
Delete async job results
Delete async job results. Raises on error.
List async jobs by status or get the status of specific job
List async jobs by status or get the status of specific job. Raises on error.
Get the results of an async job
Get the results of an async job. Raises on error.
Functions
@spec cancel(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Cancel an async job
Cancels the currently running job identified by job-id. Note that it still
might take some time to actually cancel the running async job.
@spec cancel!(Arangox.conn(), binary(), keyword()) :: term()
Cancel an async job. Raises on error.
See cancel/2.
@spec delete(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Delete async job results
Deletes either all job results, expired job results, or the result of a specific job. Clients can use this method to perform an eventual garbage collection of job results.
@spec delete!(Arangox.conn(), binary(), keyword()) :: term()
Delete async job results. Raises on error.
See delete/2.
@spec get(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
List async jobs by status or get the status of specific job
This endpoint returns either of the following, depending on the specified value
for the job-id parameter:
- The IDs of async jobs with a specific status
- The processing status of a specific async job
@spec get!(Arangox.conn(), binary(), keyword()) :: term()
List async jobs by status or get the status of specific job. Raises on error.
See get/2.
@spec result(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Get the results of an async job
Returns the result of an async job identified by job-id if it's ready.
If the async job result is available on the server, the endpoint returns
the original operation's result headers and body, plus the additional
x-arango-async-job-id HTTP header. The result and job are then removed
which means that you can retrieve the result exactly once.
If the result is not available yet or if the job is not known (anymore), the additional header is not present and you can tell the status from the HTTP status code.
@spec result!(Arangox.conn(), binary(), keyword()) :: term()
Get the results of an async job. Raises on error.
See result/2.