mix rindle.sweep_orphaned_temp_files (Rindle v0.1.5)

Copy Markdown View Source

Sweeps orphaned AV temp run directories under Rindle.tmp/.

This is the explicit on-demand operator lane for temp-run-dir residue. It is separate from upload-session cleanup and shares the same internal sweep service contract as the scheduled worker path.

Usage

mix rindle.sweep_orphaned_temp_files [--dry-run | --no-dry-run | --live] [--threshold-sec SECONDS]

Options

  • --dry-run — explicitly request preview mode. This is also the default.
  • --no-dry-run / --live — perform destructive deletions.
  • --threshold-sec — sweep directories older than this many seconds. Defaults to 14400 (4 hours).

Exit codes

  • 0 — sweep completed successfully, including dry runs and zero-match runs.
  • 1 — one or more filesystem errors were encountered while scanning or deleting.

Examples

# Safe default: preview what would be swept
mix rindle.sweep_orphaned_temp_files

# Same, made explicit
mix rindle.sweep_orphaned_temp_files --dry-run --threshold-sec 14400

# Perform live deletion
mix rindle.sweep_orphaned_temp_files --no-dry-run

Safety default

The Mix task, direct service call, and scheduled worker all default to dry_run: true. Live deletion requires explicit opt-in here (--no-dry-run/--live) and in Oban cron args ("dry_run" => false).