Skip to content

Commit

Permalink
ワーカーの処理件数をログに出すように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tissueMO committed Nov 3, 2024
1 parent 0dd4b9f commit fdce8c1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extensions/discord/worker/WorkerManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class WorkerManager {
const ids = await worker.dequeueAll();
const failedIds = [];

console.info(`<${worker.prefix}> 処理対象=${ids.length}件`);

// 1件ずつ処理
for (const id of ids) {
try {
Expand All @@ -63,6 +65,7 @@ class WorkerManager {
}

// 失敗したIDをキューに戻す
console.info(`<${worker.prefix}> 失敗数=${failedIds.length}件`);
await worker.enqueue(failedIds);
}
}
Expand Down

0 comments on commit fdce8c1

Please sign in to comment.