From a14e1ada63c884d2a7a4e4f8539ef68230f83bea Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 1 Feb 2021 17:34:12 +0000 Subject: [PATCH] chore(release): 1.14.1 [skip ci] ## [1.14.1](https://github.com/taskforcesh/bullmq/compare/v1.14.0...v1.14.1) (2021-02-01) ### Bug Fixes * job finish queue events race condition ([355bca5](https://github.com/taskforcesh/bullmq/commit/355bca5ee128bf4ff37608746f9c6f7cca580eb0)) --- docs/gitbook/CHANGELOG.md | 6 +++++ ...ullmq.advancedoptions.backoffstrategies.md | 2 ++ docs/gitbook/api/bullmq.advancedoptions.md | 2 +- .../api/bullmq.backoffoptions.delay.md | 2 ++ docs/gitbook/api/bullmq.backoffoptions.md | 6 +++-- .../gitbook/api/bullmq.backoffoptions.type.md | 2 ++ .../api/bullmq.jobsoptions.attempts.md | 2 ++ .../gitbook/api/bullmq.jobsoptions.backoff.md | 2 ++ docs/gitbook/api/bullmq.jobsoptions.delay.md | 2 ++ docs/gitbook/api/bullmq.jobsoptions.jobid.md | 2 ++ docs/gitbook/api/bullmq.jobsoptions.lifo.md | 2 ++ docs/gitbook/api/bullmq.jobsoptions.md | 26 +++++++++---------- .../api/bullmq.jobsoptions.priority.md | 2 ++ .../api/bullmq.jobsoptions.ratelimiterkey.md | 2 ++ .../bullmq.jobsoptions.removeoncomplete.md | 2 ++ .../api/bullmq.jobsoptions.removeonfail.md | 2 ++ docs/gitbook/api/bullmq.jobsoptions.repeat.md | 2 ++ .../api/bullmq.jobsoptions.stacktracelimit.md | 2 ++ .../gitbook/api/bullmq.jobsoptions.timeout.md | 2 ++ .../api/bullmq.jobsoptions.timestamp.md | 2 ++ docs/gitbook/api/bullmq.md | 8 +++--- docs/gitbook/api/bullmq.processor.md | 2 ++ docs/gitbook/api/bullmq.queuebaseoptions.md | 2 +- .../api/bullmq.queuebaseoptions.prefix.md | 2 ++ ...q.queuescheduleroptions.maxstalledcount.md | 2 ++ .../api/bullmq.queuescheduleroptions.md | 6 +++-- ...q.queuescheduleroptions.stalledinterval.md | 2 ++ .../api/bullmq.ratelimiteroptions.duration.md | 2 ++ .../api/bullmq.ratelimiteroptions.groupkey.md | 2 ++ .../api/bullmq.ratelimiteroptions.max.md | 2 ++ docs/gitbook/api/bullmq.ratelimiteroptions.md | 6 ++--- .../bullmq.redisconnection.waituntilready.md | 4 +-- .../gitbook/api/bullmq.repeatoptions.count.md | 2 ++ docs/gitbook/api/bullmq.repeatoptions.cron.md | 2 ++ .../api/bullmq.repeatoptions.enddate.md | 2 ++ .../gitbook/api/bullmq.repeatoptions.every.md | 2 ++ .../gitbook/api/bullmq.repeatoptions.limit.md | 2 ++ docs/gitbook/api/bullmq.repeatoptions.md | 16 +++++++----- .../api/bullmq.repeatoptions.startdate.md | 2 ++ docs/gitbook/api/bullmq.repeatoptions.tz.md | 2 ++ .../api/bullmq.workeroptions.concurrency.md | 2 ++ docs/gitbook/api/bullmq.workeroptions.md | 2 +- docs/gitbook/api/index.md | 12 +++++++++ package.json | 2 +- 44 files changed, 123 insertions(+), 37 deletions(-) create mode 100644 docs/gitbook/CHANGELOG.md create mode 100644 docs/gitbook/api/index.md diff --git a/docs/gitbook/CHANGELOG.md b/docs/gitbook/CHANGELOG.md new file mode 100644 index 0000000000..633c8b88e3 --- /dev/null +++ b/docs/gitbook/CHANGELOG.md @@ -0,0 +1,6 @@ +## [1.14.1](https://github.com/taskforcesh/bullmq/compare/v1.14.0...v1.14.1) (2021-02-01) + + +### Bug Fixes + +* job finish queue events race condition ([355bca5](https://github.com/taskforcesh/bullmq/commit/355bca5ee128bf4ff37608746f9c6f7cca580eb0)) diff --git a/docs/gitbook/api/bullmq.advancedoptions.backoffstrategies.md b/docs/gitbook/api/bullmq.advancedoptions.backoffstrategies.md index 34beb095ef..a4c34b8b11 100644 --- a/docs/gitbook/api/bullmq.advancedoptions.backoffstrategies.md +++ b/docs/gitbook/api/bullmq.advancedoptions.backoffstrategies.md @@ -4,6 +4,8 @@ ## AdvancedOptions.backoffStrategies property +A set of custom backoff strategies keyed by name. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.advancedoptions.md b/docs/gitbook/api/bullmq.advancedoptions.md index 6dc6edf5d0..1a579e2dd7 100644 --- a/docs/gitbook/api/bullmq.advancedoptions.md +++ b/docs/gitbook/api/bullmq.advancedoptions.md @@ -14,5 +14,5 @@ export interface AdvancedOptions | Property | Type | Description | | --- | --- | --- | -| [backoffStrategies?](./bullmq.advancedoptions.backoffstrategies.md) | {} | (Optional) | +| [backoffStrategies?](./bullmq.advancedoptions.backoffstrategies.md) | {} | (Optional) A set of custom backoff strategies keyed by name. | diff --git a/docs/gitbook/api/bullmq.backoffoptions.delay.md b/docs/gitbook/api/bullmq.backoffoptions.delay.md index a12f00fde8..f48fb8ce48 100644 --- a/docs/gitbook/api/bullmq.backoffoptions.delay.md +++ b/docs/gitbook/api/bullmq.backoffoptions.delay.md @@ -4,6 +4,8 @@ ## BackoffOptions.delay property +Delay in milliseconds. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.backoffoptions.md b/docs/gitbook/api/bullmq.backoffoptions.md index ba92b3368c..78e5f764fc 100644 --- a/docs/gitbook/api/bullmq.backoffoptions.md +++ b/docs/gitbook/api/bullmq.backoffoptions.md @@ -4,6 +4,8 @@ ## BackoffOptions interface +Settings for backing off failed jobs. + Signature: ```typescript @@ -14,6 +16,6 @@ export interface BackoffOptions | Property | Type | Description | | --- | --- | --- | -| [delay?](./bullmq.backoffoptions.delay.md) | number | (Optional) | -| [type](./bullmq.backoffoptions.type.md) | string | | +| [delay?](./bullmq.backoffoptions.delay.md) | number | (Optional) Delay in milliseconds. | +| [type](./bullmq.backoffoptions.type.md) | string | Name of the backoff strategy. | diff --git a/docs/gitbook/api/bullmq.backoffoptions.type.md b/docs/gitbook/api/bullmq.backoffoptions.type.md index cddcc8311f..ca3992843c 100644 --- a/docs/gitbook/api/bullmq.backoffoptions.type.md +++ b/docs/gitbook/api/bullmq.backoffoptions.type.md @@ -4,6 +4,8 @@ ## BackoffOptions.type property +Name of the backoff strategy. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.attempts.md b/docs/gitbook/api/bullmq.jobsoptions.attempts.md index bef1ea3dda..ffc5bf3f24 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.attempts.md +++ b/docs/gitbook/api/bullmq.jobsoptions.attempts.md @@ -4,6 +4,8 @@ ## JobsOptions.attempts property +The total number of attempts to try the job until it completes. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.backoff.md b/docs/gitbook/api/bullmq.jobsoptions.backoff.md index 333a3a4f7b..c577f4c9f6 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.backoff.md +++ b/docs/gitbook/api/bullmq.jobsoptions.backoff.md @@ -4,6 +4,8 @@ ## JobsOptions.backoff property +Backoff setting for automatic retries if the job fails + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.delay.md b/docs/gitbook/api/bullmq.jobsoptions.delay.md index 14170a72db..40e6f6197f 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.delay.md +++ b/docs/gitbook/api/bullmq.jobsoptions.delay.md @@ -4,6 +4,8 @@ ## JobsOptions.delay property +An amount of miliseconds to wait until this job can be processed. Note that for accurate delays, worker and producers should have their clocks synchronized. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.jobid.md b/docs/gitbook/api/bullmq.jobsoptions.jobid.md index fafd3ea175..6fa3d079c9 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.jobid.md +++ b/docs/gitbook/api/bullmq.jobsoptions.jobid.md @@ -4,6 +4,8 @@ ## JobsOptions.jobId property +Override the job ID - by default, the job ID is a unique integer, but you can use this setting to override it. If you use this option, it is up to you to ensure the jobId is unique. If you attempt to add a job with an id that already exists, it will not be added. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.lifo.md b/docs/gitbook/api/bullmq.jobsoptions.lifo.md index 5a27bac8c2..a3f4186b2f 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.lifo.md +++ b/docs/gitbook/api/bullmq.jobsoptions.lifo.md @@ -4,6 +4,8 @@ ## JobsOptions.lifo property +If true, adds the job to the right of the queue instead of the left (default false) + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.md b/docs/gitbook/api/bullmq.jobsoptions.md index cf1878ff0b..d4976506e7 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.md +++ b/docs/gitbook/api/bullmq.jobsoptions.md @@ -14,17 +14,17 @@ export interface JobsOptions | Property | Type | Description | | --- | --- | --- | -| [attempts?](./bullmq.jobsoptions.attempts.md) | number | (Optional) | -| [backoff?](./bullmq.jobsoptions.backoff.md) | number \| [BackoffOptions](./bullmq.backoffoptions.md) | (Optional) | -| [delay?](./bullmq.jobsoptions.delay.md) | number | (Optional) | -| [jobId?](./bullmq.jobsoptions.jobid.md) | string | (Optional) | -| [lifo?](./bullmq.jobsoptions.lifo.md) | boolean | (Optional) | -| [priority?](./bullmq.jobsoptions.priority.md) | number | (Optional) | -| [rateLimiterKey?](./bullmq.jobsoptions.ratelimiterkey.md) | string | (Optional) | -| [removeOnComplete?](./bullmq.jobsoptions.removeoncomplete.md) | boolean \| number | (Optional) | -| [removeOnFail?](./bullmq.jobsoptions.removeonfail.md) | boolean \| number | (Optional) | -| [repeat?](./bullmq.jobsoptions.repeat.md) | [RepeatOptions](./bullmq.repeatoptions.md) | (Optional) | -| [stackTraceLimit?](./bullmq.jobsoptions.stacktracelimit.md) | number | (Optional) | -| [timeout?](./bullmq.jobsoptions.timeout.md) | number | (Optional) | -| [timestamp?](./bullmq.jobsoptions.timestamp.md) | number | (Optional) | +| [attempts?](./bullmq.jobsoptions.attempts.md) | number | (Optional) The total number of attempts to try the job until it completes. | +| [backoff?](./bullmq.jobsoptions.backoff.md) | number \| [BackoffOptions](./bullmq.backoffoptions.md) | (Optional) Backoff setting for automatic retries if the job fails | +| [delay?](./bullmq.jobsoptions.delay.md) | number | (Optional) An amount of miliseconds to wait until this job can be processed. Note that for accurate delays, worker and producers should have their clocks synchronized. | +| [jobId?](./bullmq.jobsoptions.jobid.md) | string | (Optional) Override the job ID - by default, the job ID is a unique integer, but you can use this setting to override it. If you use this option, it is up to you to ensure the jobId is unique. If you attempt to add a job with an id that already exists, it will not be added. | +| [lifo?](./bullmq.jobsoptions.lifo.md) | boolean | (Optional) If true, adds the job to the right of the queue instead of the left (default false) | +| [priority?](./bullmq.jobsoptions.priority.md) | number | (Optional) Ranges from 1 (highest priority) to MAX\_INT (lowest priority). Note that using priorities has a slight impact on performance, so do not use it if not required. | +| [rateLimiterKey?](./bullmq.jobsoptions.ratelimiterkey.md) | string | (Optional) Rate limiter key to use if rate limiter enabled. | +| [removeOnComplete?](./bullmq.jobsoptions.removeoncomplete.md) | boolean \| number | (Optional) If true, removes the job when it successfully completes When given an number, it specifies the maximum amount of jobs to keep. Default behavior is to keep the job in the completed set. | +| [removeOnFail?](./bullmq.jobsoptions.removeonfail.md) | boolean \| number | (Optional) If true, removes the job when it fails after all attempts. When given an number, it specifies the maximum amount of jobs to keep. | +| [repeat?](./bullmq.jobsoptions.repeat.md) | [RepeatOptions](./bullmq.repeatoptions.md) | (Optional) Repeat this job, for example based on a cron schedule. | +| [stackTraceLimit?](./bullmq.jobsoptions.stacktracelimit.md) | number | (Optional) Limits the amount of stack trace lines that will be recorded in the stacktrace. | +| [timeout?](./bullmq.jobsoptions.timeout.md) | number | (Optional) The number of milliseconds after which the job should be fail with a timeout error. | +| [timestamp?](./bullmq.jobsoptions.timestamp.md) | number | (Optional) Defaults to Date.now() | diff --git a/docs/gitbook/api/bullmq.jobsoptions.priority.md b/docs/gitbook/api/bullmq.jobsoptions.priority.md index b885807db8..ecca363434 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.priority.md +++ b/docs/gitbook/api/bullmq.jobsoptions.priority.md @@ -4,6 +4,8 @@ ## JobsOptions.priority property +Ranges from 1 (highest priority) to MAX\_INT (lowest priority). Note that using priorities has a slight impact on performance, so do not use it if not required. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.ratelimiterkey.md b/docs/gitbook/api/bullmq.jobsoptions.ratelimiterkey.md index c131440c34..0525657d4d 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.ratelimiterkey.md +++ b/docs/gitbook/api/bullmq.jobsoptions.ratelimiterkey.md @@ -4,6 +4,8 @@ ## JobsOptions.rateLimiterKey property +Rate limiter key to use if rate limiter enabled. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.removeoncomplete.md b/docs/gitbook/api/bullmq.jobsoptions.removeoncomplete.md index 12d02f0bb0..7b71c6b29a 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.removeoncomplete.md +++ b/docs/gitbook/api/bullmq.jobsoptions.removeoncomplete.md @@ -4,6 +4,8 @@ ## JobsOptions.removeOnComplete property +If true, removes the job when it successfully completes When given an number, it specifies the maximum amount of jobs to keep. Default behavior is to keep the job in the completed set. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.removeonfail.md b/docs/gitbook/api/bullmq.jobsoptions.removeonfail.md index 681b1f13fb..05b711b1a5 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.removeonfail.md +++ b/docs/gitbook/api/bullmq.jobsoptions.removeonfail.md @@ -4,6 +4,8 @@ ## JobsOptions.removeOnFail property +If true, removes the job when it fails after all attempts. When given an number, it specifies the maximum amount of jobs to keep. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.repeat.md b/docs/gitbook/api/bullmq.jobsoptions.repeat.md index dd9355aea8..7ca15bdca8 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.repeat.md +++ b/docs/gitbook/api/bullmq.jobsoptions.repeat.md @@ -4,6 +4,8 @@ ## JobsOptions.repeat property +Repeat this job, for example based on a `cron` schedule. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.stacktracelimit.md b/docs/gitbook/api/bullmq.jobsoptions.stacktracelimit.md index 16edfd9969..1be90e3232 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.stacktracelimit.md +++ b/docs/gitbook/api/bullmq.jobsoptions.stacktracelimit.md @@ -4,6 +4,8 @@ ## JobsOptions.stackTraceLimit property +Limits the amount of stack trace lines that will be recorded in the stacktrace. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.timeout.md b/docs/gitbook/api/bullmq.jobsoptions.timeout.md index f3b8a1c40f..e82b3c402a 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.timeout.md +++ b/docs/gitbook/api/bullmq.jobsoptions.timeout.md @@ -4,6 +4,8 @@ ## JobsOptions.timeout property +The number of milliseconds after which the job should be fail with a timeout error. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.jobsoptions.timestamp.md b/docs/gitbook/api/bullmq.jobsoptions.timestamp.md index aafd04e3eb..21f33810c9 100644 --- a/docs/gitbook/api/bullmq.jobsoptions.timestamp.md +++ b/docs/gitbook/api/bullmq.jobsoptions.timestamp.md @@ -4,6 +4,8 @@ ## JobsOptions.timestamp property +Defaults to `Date.now()` + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.md b/docs/gitbook/api/bullmq.md index e4ea83bda4..16f716e1c8 100644 --- a/docs/gitbook/api/bullmq.md +++ b/docs/gitbook/api/bullmq.md @@ -33,7 +33,7 @@ | Interface | Description | | --- | --- | | [AdvancedOptions](./bullmq.advancedoptions.md) | | -| [BackoffOptions](./bullmq.backoffoptions.md) | | +| [BackoffOptions](./bullmq.backoffoptions.md) | Settings for backing off failed jobs. | | [ChildProcessExt](./bullmq.childprocessext.md) | | | [JobJson](./bullmq.jobjson.md) | | | [JobsOptions](./bullmq.jobsoptions.md) | | @@ -41,9 +41,9 @@ | [QueueEvents](./bullmq.queueevents.md) | | | [QueueEventsOptions](./bullmq.queueeventsoptions.md) | | | [QueueOptions](./bullmq.queueoptions.md) | | -| [QueueSchedulerOptions](./bullmq.queuescheduleroptions.md) | | +| [QueueSchedulerOptions](./bullmq.queuescheduleroptions.md) | Options for customizing the behaviour of the scheduler. | | [RateLimiterOptions](./bullmq.ratelimiteroptions.md) | | -| [RepeatOptions](./bullmq.repeatoptions.md) | | +| [RepeatOptions](./bullmq.repeatoptions.md) | Settings for repeatable jobs | | [SandboxedJob](./bullmq.sandboxedjob.md) | | | [Strategies](./bullmq.strategies.md) | | | [WorkerOptions](./bullmq.workeroptions.md) | | @@ -62,7 +62,7 @@ | --- | --- | | [BackoffFunction](./bullmq.backofffunction.md) | | | [ConnectionOptions](./bullmq.connectionoptions.md) | | -| [Processor](./bullmq.processor.md) | | +| [Processor](./bullmq.processor.md) | An async function that receives Jobs and handles them. | | [RedisOptions](./bullmq.redisoptions.md) | | | [SandboxedJobProcessor](./bullmq.sandboxedjobprocessor.md) | | diff --git a/docs/gitbook/api/bullmq.processor.md b/docs/gitbook/api/bullmq.processor.md index 9df27c3667..bfd9b9b142 100644 --- a/docs/gitbook/api/bullmq.processor.md +++ b/docs/gitbook/api/bullmq.processor.md @@ -4,6 +4,8 @@ ## Processor type +An async function that receives `Job`s and handles them. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.queuebaseoptions.md b/docs/gitbook/api/bullmq.queuebaseoptions.md index 9f31156233..0e0dd1f44e 100644 --- a/docs/gitbook/api/bullmq.queuebaseoptions.md +++ b/docs/gitbook/api/bullmq.queuebaseoptions.md @@ -16,5 +16,5 @@ export interface QueueBaseOptions | --- | --- | --- | | [client?](./bullmq.queuebaseoptions.client.md) | Redis | (Optional) | | [connection?](./bullmq.queuebaseoptions.connection.md) | [ConnectionOptions](./bullmq.connectionoptions.md) | (Optional) | -| [prefix?](./bullmq.queuebaseoptions.prefix.md) | string | (Optional) | +| [prefix?](./bullmq.queuebaseoptions.prefix.md) | string | (Optional) Prefix for all queue keys. | diff --git a/docs/gitbook/api/bullmq.queuebaseoptions.prefix.md b/docs/gitbook/api/bullmq.queuebaseoptions.prefix.md index ab1c50270c..7d65d4abc4 100644 --- a/docs/gitbook/api/bullmq.queuebaseoptions.prefix.md +++ b/docs/gitbook/api/bullmq.queuebaseoptions.prefix.md @@ -4,6 +4,8 @@ ## QueueBaseOptions.prefix property +Prefix for all queue keys. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.queuescheduleroptions.maxstalledcount.md b/docs/gitbook/api/bullmq.queuescheduleroptions.maxstalledcount.md index 65217714e3..8f7335d728 100644 --- a/docs/gitbook/api/bullmq.queuescheduleroptions.maxstalledcount.md +++ b/docs/gitbook/api/bullmq.queuescheduleroptions.maxstalledcount.md @@ -4,6 +4,8 @@ ## QueueSchedulerOptions.maxStalledCount property +Amount of times a job can be recovered from a stalled state to the `wait` state. If this is exceeded, the job is moved to `failed`. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.queuescheduleroptions.md b/docs/gitbook/api/bullmq.queuescheduleroptions.md index 1ee70a1904..f47e4269fc 100644 --- a/docs/gitbook/api/bullmq.queuescheduleroptions.md +++ b/docs/gitbook/api/bullmq.queuescheduleroptions.md @@ -4,6 +4,8 @@ ## QueueSchedulerOptions interface +Options for customizing the behaviour of the scheduler. + Signature: ```typescript @@ -15,6 +17,6 @@ export interface QueueSchedulerOptions extends QueueBaseOptions | Property | Type | Description | | --- | --- | --- | -| [maxStalledCount?](./bullmq.queuescheduleroptions.maxstalledcount.md) | number | (Optional) | -| [stalledInterval?](./bullmq.queuescheduleroptions.stalledinterval.md) | number | (Optional) | +| [maxStalledCount?](./bullmq.queuescheduleroptions.maxstalledcount.md) | number | (Optional) Amount of times a job can be recovered from a stalled state to the wait state. If this is exceeded, the job is moved to failed. | +| [stalledInterval?](./bullmq.queuescheduleroptions.stalledinterval.md) | number | (Optional) Number of milliseconds between stallness checks. | diff --git a/docs/gitbook/api/bullmq.queuescheduleroptions.stalledinterval.md b/docs/gitbook/api/bullmq.queuescheduleroptions.stalledinterval.md index cc066e41c8..bad3ec880d 100644 --- a/docs/gitbook/api/bullmq.queuescheduleroptions.stalledinterval.md +++ b/docs/gitbook/api/bullmq.queuescheduleroptions.stalledinterval.md @@ -4,6 +4,8 @@ ## QueueSchedulerOptions.stalledInterval property +Number of milliseconds between stallness checks. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.ratelimiteroptions.duration.md b/docs/gitbook/api/bullmq.ratelimiteroptions.duration.md index 6f8d58f654..a8ff0b1787 100644 --- a/docs/gitbook/api/bullmq.ratelimiteroptions.duration.md +++ b/docs/gitbook/api/bullmq.ratelimiteroptions.duration.md @@ -4,6 +4,8 @@ ## RateLimiterOptions.duration property +Time in milliseconds. During this time, a maximum of `max` jobs will be processed. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.ratelimiteroptions.groupkey.md b/docs/gitbook/api/bullmq.ratelimiteroptions.groupkey.md index 7d5dee97f9..01c94c2797 100644 --- a/docs/gitbook/api/bullmq.ratelimiteroptions.groupkey.md +++ b/docs/gitbook/api/bullmq.ratelimiteroptions.groupkey.md @@ -4,6 +4,8 @@ ## RateLimiterOptions.groupKey property +It is possible to define a rate limiter based on group keys, for example you may want to have a rate limiter per customer instead of a global rate limiter for all customers + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.ratelimiteroptions.max.md b/docs/gitbook/api/bullmq.ratelimiteroptions.max.md index 0040e8787f..def223b00d 100644 --- a/docs/gitbook/api/bullmq.ratelimiteroptions.max.md +++ b/docs/gitbook/api/bullmq.ratelimiteroptions.max.md @@ -4,6 +4,8 @@ ## RateLimiterOptions.max property +Max number of jobs to process in the time period specified in `duration`. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.ratelimiteroptions.md b/docs/gitbook/api/bullmq.ratelimiteroptions.md index 7589409f57..4efbfa91a3 100644 --- a/docs/gitbook/api/bullmq.ratelimiteroptions.md +++ b/docs/gitbook/api/bullmq.ratelimiteroptions.md @@ -14,7 +14,7 @@ export interface RateLimiterOptions | Property | Type | Description | | --- | --- | --- | -| [duration](./bullmq.ratelimiteroptions.duration.md) | number | | -| [groupKey?](./bullmq.ratelimiteroptions.groupkey.md) | string | (Optional) | -| [max](./bullmq.ratelimiteroptions.max.md) | number | | +| [duration](./bullmq.ratelimiteroptions.duration.md) | number | Time in milliseconds. During this time, a maximum of max jobs will be processed. | +| [groupKey?](./bullmq.ratelimiteroptions.groupkey.md) | string | (Optional) It is possible to define a rate limiter based on group keys, for example you may want to have a rate limiter per customer instead of a global rate limiter for all customers | +| [max](./bullmq.ratelimiteroptions.max.md) | number | Max number of jobs to process in the time period specified in duration. | diff --git a/docs/gitbook/api/bullmq.redisconnection.waituntilready.md b/docs/gitbook/api/bullmq.redisconnection.waituntilready.md index 8eb23b4980..c1ac60e16a 100644 --- a/docs/gitbook/api/bullmq.redisconnection.waituntilready.md +++ b/docs/gitbook/api/bullmq.redisconnection.waituntilready.md @@ -9,7 +9,7 @@ Waits for a redis client to be ready. Signature: ```typescript -static waitUntilReady(client: IORedis.Redis): Promise; +static waitUntilReady(client: IORedis.Redis): Promise; ``` ## Parameters @@ -20,5 +20,5 @@ static waitUntilReady(client: IORedis.Redis): Promise; Returns: -Promise<unknown> +Promise<void> diff --git a/docs/gitbook/api/bullmq.repeatoptions.count.md b/docs/gitbook/api/bullmq.repeatoptions.count.md index c7f155717a..d7d66e28ce 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.count.md +++ b/docs/gitbook/api/bullmq.repeatoptions.count.md @@ -4,6 +4,8 @@ ## RepeatOptions.count property +The start value for the repeat iteration count. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.repeatoptions.cron.md b/docs/gitbook/api/bullmq.repeatoptions.cron.md index 2ee1062101..1dab2d21e0 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.cron.md +++ b/docs/gitbook/api/bullmq.repeatoptions.cron.md @@ -4,6 +4,8 @@ ## RepeatOptions.cron property +A cron pattern + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.repeatoptions.enddate.md b/docs/gitbook/api/bullmq.repeatoptions.enddate.md index 675edf0f0f..eba08d19a5 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.enddate.md +++ b/docs/gitbook/api/bullmq.repeatoptions.enddate.md @@ -4,6 +4,8 @@ ## RepeatOptions.endDate property +End date when the repeat job should stop repeating. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.repeatoptions.every.md b/docs/gitbook/api/bullmq.repeatoptions.every.md index 2b3f03e223..c457f1ce16 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.every.md +++ b/docs/gitbook/api/bullmq.repeatoptions.every.md @@ -4,6 +4,8 @@ ## RepeatOptions.every property +Repeat after this amount of milliseconds (`cron` setting cannot be used together with this setting.) + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.repeatoptions.limit.md b/docs/gitbook/api/bullmq.repeatoptions.limit.md index 86dd24ee79..4127afa265 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.limit.md +++ b/docs/gitbook/api/bullmq.repeatoptions.limit.md @@ -4,6 +4,8 @@ ## RepeatOptions.limit property +Number of times the job should repeat at max. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.repeatoptions.md b/docs/gitbook/api/bullmq.repeatoptions.md index a8b034c56a..1b8844e703 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.md +++ b/docs/gitbook/api/bullmq.repeatoptions.md @@ -4,6 +4,8 @@ ## RepeatOptions interface +Settings for repeatable jobs + Signature: ```typescript @@ -14,13 +16,13 @@ export interface RepeatOptions | Property | Type | Description | | --- | --- | --- | -| [count?](./bullmq.repeatoptions.count.md) | number | (Optional) | -| [cron?](./bullmq.repeatoptions.cron.md) | string | (Optional) | -| [endDate?](./bullmq.repeatoptions.enddate.md) | Date \| string \| number | (Optional) | -| [every?](./bullmq.repeatoptions.every.md) | number | (Optional) | +| [count?](./bullmq.repeatoptions.count.md) | number | (Optional) The start value for the repeat iteration count. | +| [cron?](./bullmq.repeatoptions.cron.md) | string | (Optional) A cron pattern | +| [endDate?](./bullmq.repeatoptions.enddate.md) | Date \| string \| number | (Optional) End date when the repeat job should stop repeating. | +| [every?](./bullmq.repeatoptions.every.md) | number | (Optional) Repeat after this amount of milliseconds (cron setting cannot be used together with this setting.) | | [jobId?](./bullmq.repeatoptions.jobid.md) | string | (Optional) | -| [limit?](./bullmq.repeatoptions.limit.md) | number | (Optional) | +| [limit?](./bullmq.repeatoptions.limit.md) | number | (Optional) Number of times the job should repeat at max. | | [prevMillis?](./bullmq.repeatoptions.prevmillis.md) | number | (Optional) | -| [startDate?](./bullmq.repeatoptions.startdate.md) | Date \| string \| number | (Optional) | -| [tz?](./bullmq.repeatoptions.tz.md) | string | (Optional) | +| [startDate?](./bullmq.repeatoptions.startdate.md) | Date \| string \| number | (Optional) Start date when the repeat job should start repeating (only with cron). | +| [tz?](./bullmq.repeatoptions.tz.md) | string | (Optional) Timezone | diff --git a/docs/gitbook/api/bullmq.repeatoptions.startdate.md b/docs/gitbook/api/bullmq.repeatoptions.startdate.md index 3273692b6a..3a66f21b60 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.startdate.md +++ b/docs/gitbook/api/bullmq.repeatoptions.startdate.md @@ -4,6 +4,8 @@ ## RepeatOptions.startDate property +Start date when the repeat job should start repeating (only with `cron`). + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.repeatoptions.tz.md b/docs/gitbook/api/bullmq.repeatoptions.tz.md index cb1c6cd12f..b4600887ef 100644 --- a/docs/gitbook/api/bullmq.repeatoptions.tz.md +++ b/docs/gitbook/api/bullmq.repeatoptions.tz.md @@ -4,6 +4,8 @@ ## RepeatOptions.tz property +Timezone + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.workeroptions.concurrency.md b/docs/gitbook/api/bullmq.workeroptions.concurrency.md index 05ce8b194b..48e331a933 100644 --- a/docs/gitbook/api/bullmq.workeroptions.concurrency.md +++ b/docs/gitbook/api/bullmq.workeroptions.concurrency.md @@ -4,6 +4,8 @@ ## WorkerOptions.concurrency property +Amount of jobs that a single worker is allowed to work on in parallel. + Signature: ```typescript diff --git a/docs/gitbook/api/bullmq.workeroptions.md b/docs/gitbook/api/bullmq.workeroptions.md index c6d06ac579..053bc19130 100644 --- a/docs/gitbook/api/bullmq.workeroptions.md +++ b/docs/gitbook/api/bullmq.workeroptions.md @@ -15,7 +15,7 @@ export interface WorkerOptions extends QueueBaseOptions | Property | Type | Description | | --- | --- | --- | -| [concurrency?](./bullmq.workeroptions.concurrency.md) | number | (Optional) | +| [concurrency?](./bullmq.workeroptions.concurrency.md) | number | (Optional) Amount of jobs that a single worker is allowed to work on in parallel. | | [drainDelay?](./bullmq.workeroptions.draindelay.md) | number | (Optional) | | [limiter?](./bullmq.workeroptions.limiter.md) | [RateLimiterOptions](./bullmq.ratelimiteroptions.md) | (Optional) | | [lockDuration?](./bullmq.workeroptions.lockduration.md) | number | (Optional) | diff --git a/docs/gitbook/api/index.md b/docs/gitbook/api/index.md new file mode 100644 index 0000000000..cdfa76bba3 --- /dev/null +++ b/docs/gitbook/api/index.md @@ -0,0 +1,12 @@ + + +[Home](./index.md) + +## API Reference + +## Packages + +| Package | Description | +| --- | --- | +| [bullmq](./bullmq.md) | | + diff --git a/package.json b/package.json index cc187017f9..cc59698ea9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bullmq", - "version": "1.14.0", + "version": "1.14.1", "description": "Queue for messages and jobs based on Redis", "main": "dist/index.js", "types": "dist/index.d.ts",