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

Abierto
#5,205 0 comentarios 1 reacción 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
postgresql, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?
Lenguaje dominante
TypeScript
Estrellas
11.5k
Forks
968
Merge medio
4 d 9 h
PR fusionados (30 d)
64

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nitrojs/nitro

Todos los issues de nitrojs/nitro

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.