View Source StepFlow.LiveWorkers (StepFlow v1.8.0)
The LiveWorkers context.
Summary
Functions
Returns an %Ecto.Changeset{}
for tracking live worker changes.
Creates a Live Worker entry.
Deletes a LiveWorker.
Gets a single live worker by job ID
Gets a single live worker by job ID
Returns the list of Live Worker.
Updates a live worker.
Functions
Returns an %Ecto.Changeset{}
for tracking live worker changes.
Examples
iex> change_live_worker(job)
%Ecto.Changeset{source: %LiveWorker{}}
Creates a Live Worker entry.
Examples
iex> create_live_worker(%{field: value})
{:ok, %LiveWorker{}}
iex> create_live_worker(%{field: bad_value})
{:error, %Ecto.Changeset{}}
Deletes a LiveWorker.
Examples
iex> delete_live_worker(live_worker)
{:ok, %LiveWorker{}}
iex> delete_live_worker(live_worker)
{:error, %Ecto.Changeset{}}
Gets a single live worker by job ID
Examples
iex> get_by(%{"job_id" => 123})
%LiveWorker{}
iex> get_by(%{"job_id" => 456})
nil
Gets a single live worker by job ID
Examples
iex> get_by!(123)
%LiveWorker{}
iex> get_by!(456)
nil
Returns the list of Live Worker.
Examples
iex> StepFlow.LiveWorkers.list_live_workers()
%{data: [], page: 0, size: 10, total: 0}
Updates a live worker.
Examples
iex> update_live_worker(job, %{field: new_value})
{:ok, %LiveWorker{}}
iex> update_live_worker(job, %{field: bad_value})
{:error, %Ecto.Changeset{}}