Skip to content

Core Concepts

Phrase

A Phrase is a lazy task node that can represent:

  • A single task call
  • A linear chain via .then(...)
  • A DAG when phrases are nested as arguments to other phrases

Important fields used by runtime internals:

  • task_name
  • args, kwargs
  • chain
  • local-placement flag via .local(force=True|False)

Language and CeleryLanguage

Language defines the abstract orchestration contract. CeleryLanguage implements it with Celery and supports:

  • @lang.verb task registration
  • lang.grammar(...) task signature declarations
  • say, attempt_cancel, resubmit
  • execution modes: local, distributed, auto
  • orchestration modes: simple, compiled

Journal

Journal stores and serves job execution state. MongoJournal adds:

  • timeline events (JobEvent)
  • derived progress views (JobProgressView, subjobs, retries)
  • optional DAG capture for visual/operational analysis
  • worker capability registration for local placement routing

Corpus and Reference

  • Corpus: transportable data payload (bytes/object/path/url)
  • Reference: write target pointer for outputs

These enable moving larger artifacts without embedding all content in task arguments.

RestartPolicy

Defines retry semantics:

  • max_retries
  • backoff_seconds
  • exponential_backoff
  • jitter_seconds
  • retry_exceptions

Profile presets are provided (none, standard, aggressive) and can be overridden field-by-field.