fix: Queue retry behavior (#3359)
* fix: Queue retry behavior * Add default options for task queue
This commit is contained in:
@@ -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,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user