increase the seed valud of backoff delay to 2 seconds

This commit is contained in:
Hongbo Wu
2024-02-05 16:26:05 +08:00
parent dde80091b4
commit 53f63b90d7
3 changed files with 8 additions and 16 deletions

View File

@ -49,6 +49,14 @@ export const getBackendQueue = async (): Promise<Queue | undefined> => {
}
backendQueue = new Queue(QUEUE_NAME, {
connection: redisDataSource.workerRedisClient,
defaultJobOptions: {
backoff: {
type: 'exponential',
delay: 2000, // 2 seconds
},
removeOnComplete: true,
removeOnFail: true,
},
})
await backendQueue.waitUntilReady()
return backendQueue