Feature request: Task runner / job queue / durable functions with retry mechanics

Aperta
#5,205 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
postgresql, typescript
Ambito
backend, databases

Direzione di ricerca

Start by reading Nitro's existing task API and the related pull request #3237, both referenced in the issue. The request leaves the storage backend and integration approach open, so define how jobs persist across restarts and how retries, fatal errors, and failure logging fit the API before implementation.

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

Descrizione

pending triage
Describe the feature

It would be cool if Nitro could implement a job queue (also known as durable functions) that has retry mechanics. Or make it easier to implement one of the popular frameworks:

Required features:

  • Add a job to the queue that will execute the task
  • Retry on thrown error
  • Add fatal error that will not retry, example: Workflow SDK
  • Configure retry logic, e.g. staggered 10 s, 30 s, 60s, 10min, 60min, 6 hrs
  • Logging after specific amount of fails, e.g. "Task X failed 5 times"

Since Nitro already has a task api, possibly this one can be used? But tasks also have to be persistent after server restart which would require something like a kv or database.

Also, what Ive noticed with Graphile Worker is that it has a naming conflict: There "A 'task' is the type of work that a job may take", but when creating such tasks in Nitro, the folder ./tasks is already taken by Nitro tasks.

Possibly related to https://github.com/nitrojs/nitro/pull/3237

Additional information
  • Would you be willing to help implement this feature?
Lingua principale
TypeScript
Stelle
11.5k
Fork
968
Merge medio
4g 9h
PR unite (30g)
64

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

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 nitrojs/nitro

Tutte le issue di nitrojs/nitro

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.