Retention: clean up old finished jobs and cron occurrences

Aperta
#51 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp, mongodb, redis
Ambito
backend, database

Direzione di ricerca

Start with CONTRIBUTING.md for the clean-room rule, then read the existing decisions in site/decisions/ to match the ADR format. The payload names no code files, so the store providers (core, EF Core, MongoDB, Redis) have to be located from the repository. Done means an ADR for the retention settings, a bounded-batch cleanup that skips pending, running and unfinished-chain rows, a single-leader guard, logging of removed counts, and tests per provider.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

.NET enhancement roadmap

What happens

TickerNet keeps every finished time ticker and every cron occurrence forever. Nothing in the core, EF Core, MongoDB or Redis providers deletes old rows, so the tables grow without limit, and the dashboard's graphs and lists get slower as they do. Users have to write their own cleanup job against the store.

Expected

An opt-in retention setting, for example:

  • how long to keep time tickers and cron occurrences, per final status (Done, DueDone, Failed, Cancelled, Skipped), with failures typically kept longer;
  • optionally, a cap on how many occurrences to keep per cron ticker;
  • a background cleanup that deletes in bounded batches, so a large backlog doesn't lock the table;
  • never deleting rows that are pending, running, or part of a chain that isn't finished.

Notes

  • One leader is enough. Without Redis, use the store (a conditional update) so several nodes don't all run the cleanup at once, or make the delete safe to run concurrently.
  • Log or trace how many rows each pass removed.

Part of the TickerQ comparison roadmap. Design it from this description only: never read or copy code, tests or docs from TickerQ 10.5.0 or later, which is under a commercial license (see CONTRIBUTING.md). If it adds or changes public API, add an ADR in site/decisions/ and list the API in the pull request. Comment here if you'd like to pick it up, and ask anything in Discussions.

Lingua principale
C#
Stelle
0
Fork
2
Merge medio
1h 8m
PR unite (30g)
24

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TickerNet/TickerNet

Tutte le issue di TickerNet/TickerNet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.