ArangoDB's Tasks 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
List all tasks
List all tasks. Raises on error.
Create a task
Create a task. Raises on error.
Create a task with ID
Create a task with ID. Raises on error.
Delete a task
Delete a task. Raises on error.
Get a task
Get a task. Raises on error.
Functions
@spec all( Arangox.conn(), keyword() ) :: {:ok, term()} | {:error, Exception.t()}
List all tasks
Fetches all existing tasks on the server.
Returns
Recorded against ArangoDB 3.12.10:
[%{
"command" => string,
"created" => float,
"database" => string,
"id" => string,
"name" => string,
"offset" => float,
"period" => integer,
"type" => string
}]
@spec all!( Arangox.conn(), keyword() ) :: term()
List all tasks. Raises on error.
See all/1.
@spec create(Arangox.conn(), term(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Create a task
Creates a new task with a generated identifier.
@spec create!(Arangox.conn(), term(), keyword()) :: term()
Create a task. Raises on error.
See create/2.
@spec create_with_id(Arangox.conn(), binary(), term(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Create a task with ID
Registers a new task with the specified ID.
Not compatible with load balancers.
@spec create_with_id!(Arangox.conn(), binary(), term(), keyword()) :: term()
Create a task with ID. Raises on error.
See create_with_id/3.
@spec delete(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Delete a task
Deletes the task identified by id on the server.
@spec delete!(Arangox.conn(), binary(), keyword()) :: term()
Delete a task. Raises on error.
See delete/2.
@spec get(Arangox.conn(), binary(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Get a task
fetches one existing task on the server specified by id
@spec get!(Arangox.conn(), binary(), keyword()) :: term()
Get a task. Raises on error.
See get/2.