Task execution tracer (ported from celery.app.trace.build_tracer).
Handles the complete lifecycle of executing a single %Celery.Task.Context{}:
- Revocation and expiration checks
STARTEDstate tracking (task_track_started)- Task invocation with optional hard time limit (
time_limit) SUCCESSresult persistence (Celery.Backend.Redis.mark_as_done/4)callbacksandchaincontinuation dispatchRETRYhandling (both explicitCelery.Task.retry/2and automaticautoretry_for)IgnoreandRejecthandlingFAILUREpersistence anderrbacksdispatch
Summary
Functions
Executes a task described by context using app and optional revoked_set.
Types
@type trace_outcome() :: {:ok, term()} | {:retry, Celery.Retry.t()} | {:ignore, Celery.Ignore.t()} | {:reject, Celery.Reject.t()} | {:revoked, String.t()} | {:error, Exception.t(), String.t()}
Functions
@spec trace_task(Celery.t(), Celery.Task.Context.t(), MapSet.t()) :: trace_outcome()
Executes a task described by context using app and optional revoked_set.