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

オープン
#5,205 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, typescript
領域
backend, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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?
主要言語
TypeScript
スター
11.5k
フォーク
968
平均マージ
4日 9時間
マージ済み PR(30日)
64

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nitrojs/nitro のほかの issue

nitrojs/nitro の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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