Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BullMQJobQueueStrategy: configurable retries, backoff #1111

Closed
michaelbromley opened this issue Sep 23, 2021 · 1 comment
Closed

BullMQJobQueueStrategy: configurable retries, backoff #1111

michaelbromley opened this issue Sep 23, 2021 · 1 comment

Comments

@michaelbromley
Copy link
Member

michaelbromley commented Sep 23, 2021

Is your feature request related to a problem? Please describe.
Should be possible to configure retry & backoff settings for each job queue. Right now it is set to 0 retries, which is not great for many situations like sending emails.

Describe the solution you'd like
Add a new config option which allows you to configure the settings per job, in the same way that the PollingJobQueueStrategy allows:

export type BackoffStrategy = (queueName: string, attemptsMade: number, job: Job) => number;
export interface PollingJobQueueStrategyConfig {
concurrency?: number;
pollInterval?: number | ((queueName: string) => number);
backoffStrategy?: BackoffStrategy;
}

There should be a function which takes the Job instance, and returns a JobsOptions object.

@michaelbromley
Copy link
Member Author

Note: configurable retries can and should also be added to the DefaultJobQueuePlugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant