Infinite Loop
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- postgresql, typescript
調査の方向性
Start at the createQueue(...).start() entry point and reproduce the behavior with the shown emailQueue.start() call and job handler. Inspect the worker's job lifecycle and database state after a job succeeds or throws. Done means the job is handled according to its outcome, is not repeatedly reported as absent, and the background worker remains usable.
索引モデルが issue の本文から書いたものです。
説明
Hey! My project uses prisma and this looked pretty convenient so I wanted to give it a shot.
I'm facing an issue where the worker is getting stuck in an infinite loop. As soon as I add a job, it prints out an infinite amount of:
2024-06-14T06:50:14.123Z prisma-queue processing job from queue named="email"...
2024-06-14T06:50:14.123Z prisma-queue dequeuing from queue named="email"...
2024-06-14T06:50:14.124Z prisma-queue no jobs found in queue named="email"
2024-06-14T06:50:14.174Z prisma-queue processing job from queue named="email"...
2024-06-14T06:50:14.174Z prisma-queue dequeuing from queue named="email"...
2024-06-14T06:50:14.175Z prisma-queue no jobs found in queue named="email"
I noticed that in the DB, the job is not being removed. NOTE: I'm not awaiting the .start()
Code:
export const emailQueue = createQueue<JobPayload, JobResult>(
{ name: 'email' },
async (job, client) => {
const { id, payload } = job;
console.log(
`Processing job#${id} with payload=${JSON.stringify(payload)})`,
);
// await someAsyncMethod();
await job.progress(50);
const status = 200;
if (Math.random() > 0.5) {
throw new Error(`Failed for some unknown reason`);
}
console.log(`Finished job#${id} with status=${status}`);
return { status };
},
);
void emailQueue.start();
My use case is I'm running Next.js in a container and just want this to run in the background. So I just put the void emailQueue.start() so that it does it in the background. This strategy seems to work with pgboss
- 主要言語
- TypeScript
- スター
- 61
- フォーク
- 9
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
mgcrea/prisma-queue のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
mgcrea/prisma-queue#15 ·
-
Timezone issuesオープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
mgcrea/prisma-queue#10 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 25/100
mgcrea/prisma-queue#9 · コメント 3 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
mgcrea/prisma-queue#5 · コメント 1 件 · リアクション 1 件 ·
mgcrea/prisma-queue の issue をすべて見る
似ている issue
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
inu-appcenter/memorIN-frontend#106 ·
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 7 日以内に返信
-
[Bug] @deck.gl/arcgis dist import resolves to unpublished @deck.gl/core source path (9.3.11, 9.4.0)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
CSCfi/sd-search-ui#145 ·
メンテナーはふだん 1 日以内に返信
-
Add: Cbeebies pl SDオープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信