Skip to content
Snippets Groups Projects
Unverified Commit 8ec96ad1 authored by CyberRex's avatar CyberRex Committed by GitHub
Browse files

fix(backend): ジョブキュー再試行時のタイミングずれによるエラーを抑制 (#11035)

* fix(backend): ジョブキュー再試行時のタイミングずれによるエラーを抑制

* fix lint
parent 4f876c9e
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
delayedQueues = await this.queueService.deliverQueue.getDelayed();
for (let queueIndex = 0; queueIndex < delayedQueues.length; queueIndex++) {
const queue = delayedQueues[queueIndex];
await queue.promote();
try {
await queue.promote();
} catch (e) {
if (e instanceof Error) {
if (e.message.indexOf('not in a delayed state') !== -1) {
throw e;
}
} else {
throw e;
}
}
}
break;
......@@ -41,7 +51,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
delayedQueues = await this.queueService.inboxQueue.getDelayed();
for (let queueIndex = 0; queueIndex < delayedQueues.length; queueIndex++) {
const queue = delayedQueues[queueIndex];
await queue.promote();
try {
await queue.promote();
} catch (e) {
if (e instanceof Error) {
if (e.message.indexOf('not in a delayed state') !== -1) {
throw e;
}
} else {
throw e;
}
}
}
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment