mix rindle.backfill_metadata (Rindle v0.1.5)

Copy Markdown View Source

Reruns the configured analyzer for assets in ready, available, or degraded states and persists the updated metadata to the database.

This is the recovery path when analyzer output changes (new fields added, bug fixes in analysis logic, or assets promoted before analysis ran).

The CLI is a thin wrapper around Rindle's internal metadata backfill service (T-04-09 mitigation: arguments cannot bypass the analyzer or persistence rules).

Usage

mix rindle.backfill_metadata [--storage MODULE] [--analyzer MODULE] [--profile PROFILE]

Options

  • --storage MODULE — fully-qualified storage adapter module used to download asset source files. Defaults to the :default_storage configured in the :rindle application environment.
  • --analyzer MODULE — fully-qualified analyzer module. Defaults to :default_analyzer in the :rindle application environment.
  • --profile PROFILE — restrict backfill to assets with this profile string (e.g. Elixir.MyApp.AvatarProfile). When omitted, all eligible assets are processed.

Exit codes

  • 0 — backfill completed with no failures.
  • 1 — one or more asset failures occurred (errors are logged and counted).

Examples

# Backfill all eligible assets using configured defaults
mix rindle.backfill_metadata

# Backfill with a specific storage adapter
mix rindle.backfill_metadata --storage Rindle.Storage.Local

# Restrict to a specific profile
mix rindle.backfill_metadata --profile Elixir.MyApp.AvatarProfile

# Full override (useful for one-off operations with a test adapter)
mix rindle.backfill_metadata \
  --storage Rindle.Storage.S3 \
  --analyzer Rindle.Analyzer.Image

Notes

Only ready, available, and degraded assets are processed. Assets in terminal or in-progress states are skipped automatically.

Failures in individual assets are counted and reported but do not abort the run; the task exits non-zero only if the total failure count is greater than zero.