Skip to content

Releases: SGrondin/bottleneck

Type definitions and Cluster.changeTimeout()

19 Jun 22:49
Compare
Choose a tag to compare
  • Added TypeScript type definitions thanks to @alexperovich
  • Added Cluster.changeTimeout()

Fixed missing args in 'dropped' event from schedule()

19 Jan 00:07
Compare
Choose a tag to compare
  • Propagate the arguments coming from promise()/promisePriority() into the task runner so that the dropped event shows the arguments that were given to Bottleneck.

Safer stopAll()

30 Oct 15:51
Compare
Choose a tag to compare
  • Changed internal representation of jobs tracking from a sparse array to an object. Fixes #25
  • Instead of disabling submit/submitPriority/schedule/schedulePriority, stopAll() now makes those functions automatically reject any new requests with a descriptive error. This should save a lot of frustration and help users debug their programs.

'idle' event, removeAllListeners(), nbRunning()

05 Oct 17:08
Compare
Choose a tag to compare
  • Added the idle event. It is emitted when both nbQueued() and nbRunning() drop to 0, which means there is nothing running and nothing queued up.
  • Added the removeAllListeners() method which follows the same pattern as the standard Node.js method of the same name. It supports an optional event name as first argument.
  • Added the nbRunning() method which returns the number of requests currently running in the limiter.

Fixed issue with callbacks and rejectOnDrop

25 Sep 15:52
Compare
Choose a tag to compare
  • Fixed an issue where the callback arguments when using rejectOnDrop with submit and submitPriority would be shifted when the job would be dropped.

Added rejectOnDrop

25 Sep 15:36
Compare
Choose a tag to compare
  • Added a new constructor parameter: rejectOnDrop. When set to true, dropped jobs will be failed/rejected with the Error This job has been dropped by Bottleneck.

Changed high water default

07 May 20:20
Compare
Choose a tag to compare
  • Default highWater value went from 0 (unlimited) to -1 (unlimited). This makes it possible to create limiters that drop anything that would have gone into the queue, in order words setting highWater to 0 will create a limiter that will only accept requests that will be executed immediately.

Added support for events

23 Mar 16:38
Compare
Choose a tag to compare
  • Added .on('empty', callback)
  • Added .on('dropped', callback)

Fixed documentation

23 Mar 16:37
Compare
Choose a tag to compare
  • Bottleneck.Promise = ... --> Bottleneck.prototype.Promise

v1.10.1

23 Jan 02:05
Compare
Choose a tag to compare

Fixed bug #8 thanks to @albertreed