Celery.Result.GroupResult (celery v0.1.0)

Copy Markdown View Source

Result handle for a group of tasks (GroupResult in Python Celery).

Summary

Functions

Returns the number of completed tasks in the group.

Deletes the saved group metadata from Redis.

Returns true if any child result in the group failed.

Waits for all tasks in the group to complete and returns their results in order.

Alias for get/2 (matches GroupResult.join in Python Celery).

Creates a new %Celery.Result.GroupResult{}.

Returns true when all child results in the group are ready.

Restores a %Celery.Result.GroupResult{} from the Redis backend.

Saves the group result IDs to the Redis backend under celery-taskset-meta-<id>.

Returns true when all child results in the group succeeded.

Types

t()

@type t() :: %Celery.Result.GroupResult{
  app: Celery.t() | Celery.Config.t() | nil,
  id: String.t(),
  parent: Celery.Result.t() | nil,
  results: [Celery.Result.t()]
}

Functions

completed_count(group_result)

@spec completed_count(t()) :: non_neg_integer()

Returns the number of completed tasks in the group.

delete(group_result)

@spec delete(t()) :: :ok

Deletes the saved group metadata from Redis.

failed?(group_result)

@spec failed?(t()) :: boolean()

Returns true if any child result in the group failed.

get(group_result, opts \\ [])

@spec get(t(), keyword()) :: [term()]

Waits for all tasks in the group to complete and returns their results in order.

join(group_res, opts \\ [])

@spec join(t(), keyword()) :: [term()]

Alias for get/2 (matches GroupResult.join in Python Celery).

new(id, results \\ [], opts \\ [])

@spec new(String.t(), [Celery.Result.t()], keyword()) :: t()

Creates a new %Celery.Result.GroupResult{}.

ready?(group_result)

@spec ready?(t()) :: boolean()

Returns true when all child results in the group are ready.

restore(group_id, opts \\ [])

@spec restore(String.t(), keyword()) :: t() | nil

Restores a %Celery.Result.GroupResult{} from the Redis backend.

save(group_result)

@spec save(t()) :: :ok | {:error, term()}

Saves the group result IDs to the Redis backend under celery-taskset-meta-<id>.

successful?(group_result)

@spec successful?(t()) :: boolean()

Returns true when all child results in the group succeeded.