Quantcast
Channel: Active questions tagged retry-logic - Stack Overflow
Viewing all articles
Browse latest Browse all 950

Custom backoffs in nestjs bullmq

$
0
0

I want to set the custom backoff for my queue in nestjs.

BullModule.registerQueue({  name: POST_QUEUES.PARSE_POST_QUEUE,  defaultJobOptions: {    backoff: { type: 'exponential', delay: JOB_DELAY_TIME.ONE_SECOND },    attempts: 10,  },}),

I want to replace this exponential backoff with the custom one where for AccountNotFound exception the delay would be 20 seconds and for any other exception delay would be 5 seconds.


Viewing all articles
Browse latest Browse all 950