fix: Queue retry behavior (#3359)

* fix: Queue retry behavior

* Add default options for task queue
This commit is contained in:
Tom Moor
2022-04-10 17:50:42 -07:00
committed by GitHub
parent cfa71762c2
commit 963475d2b0
5 changed files with 124 additions and 34 deletions

View File

@@ -1,9 +1,29 @@
import { createQueue } from "@server/utils/queue";
export const globalEventQueue = createQueue("globalEvents");
export const globalEventQueue = createQueue("globalEvents", {
attempts: 5,
backoff: {
type: "exponential",
delay: 1000,
},
});
export const processorEventQueue = createQueue("processorEvents");
export const processorEventQueue = createQueue("processorEvents", {
attempts: 5,
backoff: {
type: "exponential",
delay: 10 * 1000,
},
});
export const websocketQueue = createQueue("websockets");
export const websocketQueue = createQueue("websockets", {
timeout: 10 * 1000,
});
export const taskQueue = createQueue("tasks");
export const taskQueue = createQueue("tasks", {
attempts: 5,
backoff: {
type: "exponential",
delay: 10 * 1000,
},
});