Baton.Node (Baton v0.1.0)

Copy Markdown View Source

A single step within a workflow DAG.

Holds everything the engine needs that is not part of Oban's own job record: the step's dependencies, its cancellation-handling flags, and its stored result. Linked to the Oban job by oban_job_id.

This schema is the source of truth for workflow structure and results. The Oban job's meta carries only immutable identifiers (workflow_id, workflow_name, workflow_label) for cheap lookups that start from oban_jobs; it is written once at insert and never mutated.

Summary

Types

t()

@type t() :: %Baton.Node{
  __meta__: term(),
  deps: [String.t()],
  id: term(),
  ignore_cancelled: boolean(),
  ignore_discarded: boolean(),
  inserted_at: term(),
  oban_job_id: integer(),
  result: map() | nil,
  step_name: String.t(),
  updated_at: term(),
  workflow_id: String.t(),
  workflow_label: String.t() | nil
}

Functions

changeset(node \\ %__MODULE__{}, attrs)