Skip to content

Job Cleanup

Learn how to manage job data retention and implement cleanup policies.

Jobs are stored in Redis with a 7-day TTL by default. This guide covers customizing retention and implementing cleanup.

  • Completed jobs: 7 days
  • Failed jobs: 7 days
  • Pending jobs: Until processed or expired

Configure custom TTL in config.yaml:

jobs:
ttl: 168h # 7 days
failed_ttl: 336h # 14 days for failed jobs
Terminal window
# Clean up old jobs
redis-cli --scan --pattern "mend:job:*" | xargs redis-cli del