Tinkex.Types.QueueState (Tinkex v0.3.4)

View Source

Queue state parser used by TryAgain responses.

Mirrors the Python QueueState enum but normalizes strings to atoms. Any unknown or missing value becomes :unknown instead of defaulting to :active, which better captures the ambiguity for downstream observers.

Summary

Functions

Parse queue state strings into atoms.

Types

t()

@type t() :: :active | :paused_rate_limit | :paused_capacity | :unknown

Functions

parse(value)

@spec parse(String.t() | nil) :: t()

Parse queue state strings into atoms.

Values are case-insensitive and handle strings with underscores or mixed casing (e.g. "PAUSED_RATE_LIMIT"). Invalid or missing values return :unknown.