# `Relyra.OptionalDeps.Oban`
[🔗](https://github.com/szTheory/relyra/blob/v1.1.0/lib/relyra/optional_deps/oban.ex#L1)

Optional-deps gateway for Oban (D-02, D-37 canonical pattern). Lets the
Phase 21 worker (`Relyra.Workers.MetadataRefresh`) and the documented
Oban Cron one-liner reference Oban modules even when Oban is not in the
adopter's deps tree.

The `@compile {:no_warn_undefined, [...]}` attribute keeps the
`mix compile --no-optional-deps --warnings-as-errors` CI lane green
(engineering-DNA §3 invariant).

Phase 21 deviates from `Relyra.LiveAdmin`'s `raise ArgumentError` shape
because the Phase-21 callers (the worker `perform/1` callback) expect
the `{:ok | :error, %Relyra.Error{}}` result-tuple discipline. Adopters
who want a hard crash can pattern-match `{:error, _}` and re-raise.

# `available?`

```elixir
@spec available?() :: boolean()
```

# `ensure_available!`

```elixir
@spec ensure_available!(atom()) :: :ok | {:error, Relyra.Error.t()}
```

# `required_modules`

```elixir
@spec required_modules() :: [module()]
```

List of Oban modules required by Phase 21 (for diagnostics).

---

*Consult [api-reference.md](api-reference.md) for complete listing*
