mix phoenix_kit.email.cleanup (phoenix_kit v1.6.16)
View SourceMix task to clean up old email system logs and optimize storage.
Usage
# Clean logs older than default retention period (90 days)
mix phoenix_kit.email.cleanup
# Clean logs older than specific number of days
mix phoenix_kit.email.cleanup --older-than 30d
# Show what would be deleted without actually deleting
mix phoenix_kit.email.cleanup --dry-run
# Compress old bodies instead of deleting
mix phoenix_kit.email.cleanup --compress-only
# Archive to S3 before deleting
mix phoenix_kit.email.cleanup --archiveOptions
--older-than PERIOD Delete logs older than period (e.g., 30d, 60d, 90d)
--dry-run Show what would be deleted without deleting
--compress-only Only compress old email bodies, don't delete
--archive Archive logs to S3 before deleting
--force Skip confirmation promptsExamples
# Safe dry run to see what would be cleaned
mix phoenix_kit.email.cleanup --dry-run
# Clean logs older than 30 days with archive
mix phoenix_kit.email.cleanup --older-than 30d --archive
# Compress bodies for logs older than 7 days
mix phoenix_kit.email.cleanup --older-than 7d --compress-only