apalis-dev / apalis-dev/apalis

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

オープン
#773 コメント 2 件 リアクション 1 件 担当者 1 名 @geofmureithi が担当を希望しています GitHub で見る
enhancement
主要言語
Rust
スター
1.4k
フォーク
93
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。