Class

Queue

util.Queue(backoff, rateLimit, debug)

Constructor

new Queue(backoff, rateLimit, debug)

Creates a queue with the given backoff parameter

Parameters:
Name Type Description
backoff number

Base backoff time in milliseconds.

rateLimit number

Milliseconds to wait between requests.

debug boolean

Whether or not debug info should be logged.

View Source lib/util/queue.js, line 15

Members

static State

Get enum of queue states

View Source lib/util/queue.js, line 42

backoff

Get the backoff rate

View Source lib/util/queue.js, line 64

backoff

Set the backoff rate

View Source lib/util/queue.js, line 72

rateLimit

Get the rateLimit

View Source lib/util/queue.js, line 49

rateLimit

Set the rate-limit

View Source lib/util/queue.js, line 57

state

Get the current state of the queue

View Source lib/util/queue.js, line 35

Methods

block()

Block job execution

View Source lib/util/queue.js, line 92

clear()

Deletes all the jobs from the queue

View Source lib/util/queue.js, line 112

release()

Start job execution

View Source lib/util/queue.js, line 100

schedule(job)

Schedule a job for execution

Parameters:
Name Type Description
job function

Function that needs to be executed

View Source lib/util/queue.js, line 80