apalis-dev / apalis-dev/apalis

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

Offen
#773 2 Kommentare 1 Reaktion 1 zugewiesene Person Beansprucht von @geofmureithi Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Rust
Sterne
1.4k
Forks
93
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Is your feature request related to a problem?

The following issue: https://github.com/apalis-dev/apalis-redis/issues/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

- [x] I agree to follow this project's Code of Conduct

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.