StepFlow.WorkerDefinitions (StepFlow v0.2.7) View Source

The WorkerDefinitions context.

Link to this section Summary

Functions

Creates a WorkerDefinition.

Gets a single WorkerDefinition.

Returns the list of WorkerDefinitions.

Link to this section Functions

Link to this function

create_worker_definition(attrs \\ %{})

View Source

Creates a WorkerDefinition.

Examples

iex> result = StepFlow.WorkerDefinitions.create_worker_definition(%{
...>   queue_name: "my_queue",
...>   label: "My Queue",
...>   version: "1.2.3",
...>   short_description: "short description",
...>   description: "long description",
...>   parameters: %{}
...> })
...> match?({:ok, %StepFlow.WorkerDefinitions.WorkerDefinition{}}, result)
true

iex> result = StepFlow.WorkerDefinitions.create_worker_definition(%{field: :bad_value})
...> match?({:error, %Ecto.Changeset{}}, result)
true
Link to this function

get_worker_definition!(id)

View Source

Gets a single WorkerDefinition.

Raises Ecto.NoResultsError if the WorkerDefinition does not exist.

Link to this function

list_worker_definitions(params \\ %{})

View Source

Returns the list of WorkerDefinitions.

Examples

iex> StepFlow.WorkerDefinitions.list_worker_definitions()
%{data: [], page: 0, size: 10, total: 0}