Delegates to Threadline.Retention.purge/1 after loading application config and
starting the configured Ecto repo (same resolution pattern as mix threadline.verify_coverage).
Configuration
Purge is a no-op (Mix raises) unless config :threadline, :retention, enabled: true
and the rest of the map passes Threadline.Retention.Policy.validate_config!/1.
Flags
--batch-size— rows per delete pass (default500inpurge/1).--max-batches— safety cap on outer iterations.--dry-run— counts eligibleaudit_changes/ emptyaudit_transactionsonly; no deletes.--execute— required whenMIX_ENV=prod, in addition toenabled: true, so production crons cannot delete data from a mistyped command alone.
Examples
mix threadline.retention.purge --dry-run
mix threadline.retention.purge --batch-size 200 --max-batches 50Production (after explicit config review):
MIX_ENV=prod mix threadline.retention.purge --execute --batch-size 500