Skip to content

Flow doesn't follow Queue's default job options #1034

@hicaro

Description

@hicaro

The default job options set on the queue level are not obeyed when enqueuing jobs with the flow producer.

For instance, creating a queue like this:

const queue = new Queue('a-queue', {
  connection: redisClient,
  defaultJobOptions: {
    attempts: 3,
    delay: 500,
    removeOnComplete: 25,
    removeOnFail: 25,
    backoff: {
      type: 'exponential',
      delay: 5000,
    },
  },
  limiter: {
    groupKey: 'someId',
  },
});

The job dispatched by the flow producer will have the following properties:

{
  "attempts": 0,
  "delay": 0
}

Is there anything else I should be doing for it to work correctly?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions