Skip to content

[Feature]: Add a duration parameter to vaccum() #773

Description

@SlimBeji

Is your feature request related to a problem?

The following issue: apalis-dev/apalis-redis#19 discusses the existing vacuum() API.

Currently, vacuum() removes all completed/killed jobs immediately, but there is no way to retain recent history while cleaning up older entries.

A retention-aware API could help applications keep operational visibility for a limited period (for example 7–14 days) while preventing Redis storage growth over time.

Describe the solution you'd like

use std::time::Duration;

storage
    .vacuum_before(Duration::from_secs(60 * 60 * 24 * 7))
    .await?;

Describe alternatives you've considered

No response

Use case

A retention-aware API could help applications keep operational visibility for a limited period (for example 7–14 days) while preventing Redis storage growth over time.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions