Continuum.Activity.Policy (continuum v0.6.2)

Copy Markdown View Source

Validated, normalized execution policy for an activity call.

Retry limits include both execution timeouts and backoff delays, so a policy cannot silently schedule work beyond its configured retry horizon.

Summary

Functions

Returns the largest supported per-attempt timeout in milliseconds.

Normalizes and validates activity execution options.

Returns the canonical retry keyword stored with durable activity work.

Types

t()

@type t() :: %Continuum.Activity.Policy{
  backoff: :constant | :exponential,
  base_ms: non_neg_integer(),
  idempotency_key: binary() | nil,
  max_attempts: pos_integer(),
  max_backoff_ms: non_neg_integer(),
  max_retry_horizon_ms: pos_integer(),
  timeout_ms: pos_integer()
}

Functions

max_timeout_ms()

@spec max_timeout_ms() :: pos_integer()

Returns the largest supported per-attempt timeout in milliseconds.

normalize!(opts)

@spec normalize!(keyword()) :: t()

Normalizes and validates activity execution options.

retry_options(policy)

@spec retry_options(t()) :: keyword()

Returns the canonical retry keyword stored with durable activity work.