diff --git a/docs/gitbook/guide/rate-limiting.md b/docs/gitbook/guide/rate-limiting.md index 20b03d20f1..7bb0080285 100644 --- a/docs/gitbook/guide/rate-limiting.md +++ b/docs/gitbook/guide/rate-limiting.md @@ -81,10 +81,18 @@ const worker = new Worker( }, { connection, + limiter: { + max: 1, + duration: 500, + }, }, ); ``` +{% hint style="warning" %} +Don't forget to pass limiter options into your worker's options as _limiter.max_ is used to determine if we need to execute the rate limit validation. +{% endhint %} + ### Get Queue Rate Limit Ttl Sometimes is useful to know if our queue is rate limited. diff --git a/docs/gitbook/patterns/stop-retrying-jobs.md b/docs/gitbook/patterns/stop-retrying-jobs.md index c64248347f..584409c466 100644 --- a/docs/gitbook/patterns/stop-retrying-jobs.md +++ b/docs/gitbook/patterns/stop-retrying-jobs.md @@ -46,6 +46,10 @@ const worker = new Worker( }, { connection, + limiter: { + max: 1, + duration: 500, + }, }, ); ```