Celery.Task.Context (celery v0.1.0)

Copy Markdown View Source

Task execution request context (self.request in Python Celery, ported from celery.app.task.Context).

When a task is defined with bind: true, the first argument passed to the task function is a %Celery.Task{} struct whose :request field is a %Celery.Task.Context{}.

Summary

Functions

Creates a new %Celery.Task.Context{} from a map or keyword list.

Types

t()

@type t() :: %Celery.Task.Context{
  args: list(),
  argsrepr: String.t() | nil,
  callbacks: list() | nil,
  called_directly: boolean(),
  chain: list() | nil,
  chord: map() | nil,
  correlation_id: String.t() | nil,
  delivery_info: map(),
  errbacks: list() | nil,
  eta: String.t() | DateTime.t() | nil,
  expires: String.t() | DateTime.t() | number() | nil,
  group: String.t() | nil,
  group_index: non_neg_integer() | nil,
  headers: map(),
  hostname: String.t() | nil,
  id: String.t() | nil,
  ignore_result: boolean(),
  is_eager: boolean(),
  kwargs: map(),
  kwargsrepr: String.t() | nil,
  logfile: String.t() | nil,
  loglevel: atom() | non_neg_integer() | nil,
  origin: String.t() | nil,
  parent_id: String.t() | nil,
  properties: map(),
  replaced_task_nesting: non_neg_integer(),
  reply_to: String.t() | nil,
  retries: non_neg_integer(),
  root_id: String.t() | nil,
  shadow: String.t() | nil,
  stamped_headers: list() | nil,
  stamps: map() | nil,
  task: String.t() | nil,
  timelimit: [number() | nil] | {number() | nil, number() | nil}
}

Functions

new(attrs \\ %{})

@spec new(map() | keyword()) :: t()

Creates a new %Celery.Task.Context{} from a map or keyword list.