OptimalBits / bull

Premium Queue package for handling distributed jobs and messages in NodeJS.
Other
15.58k stars 1.43k forks source link

Bull moving failed jobs to completed set #2751

Closed SufianAmritm closed 5 months ago

SufianAmritm commented 5 months ago

Description

Same as title, no matter what, it retries 1 or 2 times and job goes to completed set with failed status. Here is my module setup, i am using nestjs.

Module

BullModule.registerQueue({
      name:
        process.env.NODE_ENV === 'production'
          ? DAWN_QUEUES.CHECK_JOB_STATUS_PRODUCTION
          : DAWN_QUEUES.CHECK_JOB_STATUS_DEVELOPMENT,
      defaultJobOptions: {
        removeOnFail: false,
        removeOnComplete: false,
        backoff: {
          delay: 2000,
          type: 'exponential',
        },
        attempts: 99,
      },
    }),
  #Processor
     @Process({
    name:
      environment === 'production'
        ? QUEUE_EVENTS.CHECK_JOB_PRODUCTION
        : QUEUE_EVENTS.CHECK_JOB_DEVELOPMENT,
    concurrency: 5,
  })
  async handleQueueJobs(job: Job<any>) {
    try {
      if (this.available) {
    throw new Error("Error check');

        }
      }
    } catch (e) {
      console.error(e);

      throw e;
    }
  }

Bull version

4.14

Nestjs/Bull

10.1.1

Additional information

Doing nothing as you see, this is as minimal as it can be. image image