Celery Canvas workflow primitives (signature, chain, group, chord)
compatible with Python Celery's wire protocol.
Summary
Functions
Executes a sequential chain of %Celery.Canvas.Signature{} tasks.
Dispatches a chord (a parallel header of %Celery.Canvas.Signature{} tasks followed by a
body callback %Celery.Canvas.Signature{} that receives the list of header results).
Returns {:ok, callback_result}.
Dispatches a parallel group of %Celery.Canvas.Signature{} tasks and returns
{:ok, %Celery.Result.GroupResult{}}.
Creates a %Celery.Canvas.Signature{} (s/2).
Creates an immutable %Celery.Canvas.Signature{} (si/2).
Functions
@spec chain([Celery.Canvas.Signature.t()], keyword()) :: {:ok, Celery.Result.t()} | {:error, term()}
Executes a sequential chain of %Celery.Canvas.Signature{} tasks.
In Celery Protocol v2, the first task in the chain is published with the remaining tasks
stored in its chain embed list (in reverse order, as Python Celery pops from the end
of request.chain!). Returns {:ok, last_task_result} with parent links pointing up
the chain.
@spec chord([Celery.Canvas.Signature.t()], Celery.Canvas.Signature.t(), keyword()) :: {:ok, Celery.Result.t()} | {:error, term()}
Dispatches a chord (a parallel header of %Celery.Canvas.Signature{} tasks followed by a
body callback %Celery.Canvas.Signature{} that receives the list of header results).
Returns {:ok, callback_result}.
@spec group([Celery.Canvas.Signature.t()], keyword()) :: {:ok, Celery.Result.GroupResult.t()} | {:error, term()}
Dispatches a parallel group of %Celery.Canvas.Signature{} tasks and returns
{:ok, %Celery.Result.GroupResult{}}.
@spec s(String.t() | map() | Celery.Canvas.Signature.t(), keyword()) :: Celery.Canvas.Signature.t()
Creates a %Celery.Canvas.Signature{} (s/2).
@spec si(String.t(), keyword()) :: Celery.Canvas.Signature.t()
Creates an immutable %Celery.Canvas.Signature{} (si/2).
@spec signature(String.t() | map() | Celery.Canvas.Signature.t(), keyword()) :: Celery.Canvas.Signature.t()