AbstractCreate a new instance of Limiter
Optionaloptions: LimiterOptionsThe limiter options
Returns the limiter options
Returns the number of pending jobs
Returns the number of jobs in the queue
Register an event listener over the done event, which is emitted when a task has ended, either
due to completion or failure.
done event
Done event listener
Register an event listener over the refill event, which is emitted when queue bucket is refilled
refill event
Refill event listener
Register an event listener over the seed event, which is emitted when queue is empty and a
new task is added
seed event
The listener function to add
Removes the specified listener from the listener array for the done event.
done event
The listener function to remove
Removes the specified listener from the listener array for the refill event.
refill event
The listener function to remove
Removes the specified listener from the listener array for the seed event.
seed event
The listener function to remove
Register an event listener over the done event, which is emitted when a task has ended, either
due to completion or failure.
done event
Done event listener
Register an event listener over the refill event, which is emitted when queue bucket is refilled
refill event
Refill event listener
Register an event listener over the seed event, which is emitted when queue is empty and a
new task is added
seed event
The listener function to add
Registers a one-time event listener over the done event, which is emitted when a task has
ended, either due to completion or failure.
done event
Done event listener
Registers a one-time event listener over the refill event, which is emitted when queue bucket
is refilled
refill event
Refill event listener
Registers a one-time event listener over the seed event, which is emitted when queue is empty
and a new task is added
seed event
The listener function to add
Registers a event listener over the done event, at the beginning of the listeners array,
which is emitted when a task has ended, either due to completion or failure.
done event
Done event listener
Registers a event listener over the refill event, at the beginning of the listeners array,
which is emitted when queue bucket is refilled
refill event
Refill event listener
Registers a event listener over the seed event, at the beginning of the listeners array, which
is emitted when queue is empty and a new task is added
seed event
The listener function to add
Registers a one-time event listener over the done event, at the beginning of the listeners
array, which is emitted when a task has ended, either due to completion or failure.
done event
Done event listener
Registers a one-time event listener over the refill event, at the beginning of the listeners
array, which is emitted when queue bucket is refilled
refill event
Refill event listener
Registers a one-time event listener over the seed event, at the beginning of the listeners
array, which is emitted when queue is empty and a new task is added
seed event
The listener function to add
Removes all listeners, or those of the specified event.
Optionalevent: "done"done event
Removes all listeners, or those of the specified event.
Optionalevent: "refill"refill event
Removes all listeners, or those of the specified event.
Optionalevent: "seed"seed event
Removes the specified listener from the listener array for the done event.
done event
The listener function to remove
Removes the specified listener from the listener array for the refill event.
refill event
The listener function to remove
Removes the specified listener from the listener array for the seed event.
seed event
The listener function to remove
A limiter state handler is a class that manages the state of a limiter, including the queue of tasks, the concurrency, and the limiter options.