Skip to content

Releases: SGrondin/bottleneck

v2.8.0

20 Aug 20:42
Compare
Choose a tag to compare
  • To use ioredis instead of Node Redis, pass the following option to Bottleneck: { datastore: "ioredis" }. ioredis supports Redis Cluster and Redis Sentinel
  • To use Redis Cluster, pass the following options to Bottleneck: { datastore: "redis", clusterNodes: [nodes] }. See the ioredis cluster docs and the Bottleneck docs for more information

v2.7.2

20 Aug 13:51
Compare
Choose a tag to compare
  • Fixed an issue where some limiter options were not properly marked as nullable.

v2.7.1

20 Aug 13:50
Compare
Choose a tag to compare
  • Fixed a Clustering issue where limiters would sometimes fail with a NOSCRIPT error.

v2.7.0

20 Aug 13:50
Compare
Choose a tag to compare
  • All limiters within a Group now share the same Redis connection. Standalone limiters continue to have their own limiters.
  • Added the timeout option to limiters to allow freeing Redis state after a period of inactivity.
  • Fixed a bug when using Groups, Clustering, highWater and job expirations.

v2.6.0

20 Aug 13:44
Compare
Choose a tag to compare
  • Added support for passing job options to a wrapped function.
const wrapped = limiter.wrap(fn);
wrapped.withOptions(options, arg1, arg2);

v2.5.1

03 Jul 01:16
Compare
Choose a tag to compare
  • Fixed a memory leak where autogenerated job IDs would progressively get longer and take more memory. All users are advised to upgrade to this version. There are no breaking changes.

v2.5.0

03 Jul 01:15
Compare
Choose a tag to compare
  • Added the stop() method, which allows safely stopping a limiter and executing work once completed. See Readme.

v2.4.0

09 Jun 19:06
Compare
Choose a tag to compare
  • Jobs with duplicate IDs are now rejected instead of throwing an exception.

v2.3.1

19 May 18:21
Compare
Choose a tag to compare
  • Fixed a warning when using Webpack v4
  • Relaxed the requirement to return a promise from .schedule().

counts(), jobStatus()

09 Apr 15:02
Compare
Choose a tag to compare

This release brings visibility into the status of limiters and jobs.

  • Added .counts() which returns an object with the number of jobs in every stage of their lifecycle.
  • Added .jobStatus(). It takes a jobId and returns the status of that job.
  • Added trackDoneStatus, a new limiter option, defaulted to false. Setting it to true will make your limiter keep track of Done jobs in .counts() and .jobStatus(). It is false by default, since it involves remembering every jobId that has ever reached the Done stage, which could lead to a memory leak if your application processes tens or hundreds of millions of jobs between restarts.