# `MailglassInbound.Prune.Worker`
[🔗](https://github.com/szTheory/mailglass/blob/v2.3.0/lib/mailglass_inbound/prune/worker.ex#L2)

Optional Oban cron worker that runs the inbound retention sweep. The
batched workhorse lives in `MailglassInbound.Internal.Prune`;
this worker's `perform/1` just delegates to `prune/0`.

## Optional-dep gating

The entire module is conditionally compiled behind
`if Code.ensure_loaded?(Oban.Worker)`. When Oban is absent a stub is defined
exposing `available?/0 -> false`; `MailglassInbound.Application` emits a
consolidated boot warning directing operators to run
`mix mailglass.inbound.prune` from their own cron infrastructure.

## Never auto-registered

This worker is NOT auto-registered in `MailglassInbound.Application`.
Operators wire the cron in their own Oban config — the recommended cadence is
`0 3 * * *` (3 AM UTC; documented in the operator guide). The
`mix mailglass.inbound.prune` task runs the sweep synchronously whether or not
Oban is present, so Oban-less adopters still get a working prune.

# `available?`
*since 1.2.0* 

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

Returns `true` when the worker is compiled (Oban available). Used by the
Application boot warning and ops tooling.

---

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