# ADR-006: Oban for Background Jobs (Not Custom Broadway)

Status: Accepted | Date: 2026-05-21

## Context
Background jobs needed: label ingestion, model training, cache pruning, sanctions loading,
cases automation, feature pre-calculation, reprocessing.
Options: Custom Broadway pipelines, Oban, GenServer polling.

## Decision
Oban 2.18 for all background/scheduled jobs.

## Justification
- Broadway: excellent for high-throughput streaming, poor fit for scheduled
  low-frequency jobs (model training, daily batch features).
- GenServer polling: no persistence, no retry, no visibility, no scheduling.
- Oban: job persistence in MySQL (fits existing infra_repo), cron scheduling,
  retry with backoff, dead letter queue, unique job constraints,
  LiveDashboard integration for job visibility. Matches Jube's background
  service role (EnableExhaustiveTraining, EnableReprocessing env flags).

---