bottleneck
bottleneck copied to clipboard
Job scheduler and rate limiter, supports Clustering
Would be great if there's a possibilty to extend an existing limiter. Use case: - An API has a rate limit of 1,000 requests/minute. - But an endpoint of that...
Hi everyone, I have a question I'll try to explain. I'm using the BottleNeck npm package (https://www.npmjs.com/package/bottleneck) to limit the number of API requests I fire every second. Currently I'm...
Either with their [Durable Objects](https://developers.cloudflare.com/workers/runtime-apis/durable-objects) or with their [Key Value Storage](https://developers.cloudflare.com/workers/runtime-apis/kv)? Use case is to use [octokit](https://github.com/octokit/core.js) with the [throttling plugin](https://github.com/octokit/plugin-throttling.js) in a cloudflare worker and use either durable objects...
Hi All, I received this bottleneck error, which asked to open an issue: ``` construct.js:19 Uncaught (in promise) Error: Invalid job status RECEIVED, expected DONE. Please open an issue at...
When the reservoir is not the same as x-ratelimit-remaining it causes a error. It happens when the api has been used by something else or x-ratelimit-remaining is not set to...
From the "reservoir" documentation: > If reservoir reaches 0, no jobs will be executed until it is no longer 0. New jobs will still be queued up. Can I avoid...
It's defined as ```ts enum Status { RECEIVED = "RECEIVED", QUEUED = "QUEUED", RUNNING = "RUNNING", EXECUTING = "EXECUTING", DONE = "DONE" } ``` But as there's no real matching...
Hi! I'm trying to rate limit calls to an API, for example, kick off one request every second. Using this library works fine, until I add in retries. The retry...
Hi! I have a pretty simple configuration for high traffic websites: ``` const limiter = new Bottleneck({ maxConcurrent: 2, highWater: 32, }) ``` Also, every job added is made withOptions,...
A handy way to wait for an event with node.js is to use the `once` function in the `events` module. e.g. `await once(bottleneck, 'empty');` to wait for the bottleneck `empty`...