Scrypath.Operator.State (scrypath v0.3.5)

Copy Markdown View Source

Stable operator state projected from backend tasks and queue jobs.

This struct gives the public operator APIs a Scrypath-owned shape for identifiers, lifecycle state, timestamps, and stable references without exposing raw backend or queue payloads as the public contract.

Summary

Types

state()

@type state() :: :pending | :queued | :retrying | :failed | :completed

t()

@type t() :: %Scrypath.Operator.State{
  at: DateTime.t() | nil,
  id: term(),
  kind: :backend_task | :queue_job | atom(),
  metadata: map(),
  reference: map(),
  source: :meilisearch | :oban | atom(),
  state: state()
}

Functions

new(attrs)

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