From 62a619ff27593d07ac20535e98a2b4b89cd534e4 Mon Sep 17 00:00:00 2001 From: Jacek Tomaszewski Date: Fri, 22 Nov 2024 15:06:34 +0100 Subject: [PATCH] docs(queues): warn that `defaultJobOptions` don't always work It's very unobvious that `defaultJobOptions` apply to jobs being scheduled only sometimes. If you schedule jobs via a `FlowProducer`, these defaults don't have any effect. I'd love to fix that, but before we tackle that, I think it's best and easiest to point out the current behaviour in the docs. See https://github.com/taskforcesh/bullmq/issues/1034 for more in-depth explanation of this problem. --- content/techniques/queues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/techniques/queues.md b/content/techniques/queues.md index b299031e61..42d02da2bc 100644 --- a/content/techniques/queues.md +++ b/content/techniques/queues.md @@ -500,7 +500,7 @@ The `forRoot()` method is used to register a `bull` package configuration object - `limiter: RateLimiter` - Options to control the rate at which the queue's jobs are processed. See [RateLimiter](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queue) for more information. Optional. - `redis: RedisOpts` - Options to configure the Redis connection. See [RedisOpts](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queue) for more information. Optional. - `prefix: string` - Prefix for all queue keys. Optional. -- `defaultJobOptions: JobOpts` - Options to control the default settings for new jobs. See [JobOpts](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queueadd) for more information. Optional. +- `defaultJobOptions: JobOpts` - Options to control the default settings for new jobs. See [JobOpts](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queueadd) for more information. Optional. **Note: These do not take effect if you schedule jobs via a FlowProducer. See [bullmq#1034](https://github.com/taskforcesh/bullmq/issues/1034) for explanation.** - `settings: AdvancedSettings` - Advanced Queue configuration settings. These should usually not be changed. See [AdvancedSettings](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queue) for more information. Optional. All the options are optional, providing detailed control over queue behavior. These are passed directly to the Bull `Queue` constructor. Read more about these options [here](https://github.com/OptimalBits/bull/blob/master/REFERENCE.md#queue).