Home Reference Source Repository
import Queue from 'wyst/es6/Queue/Queue.js'
public class | source

Queue

Extends:

eventemitter2~EventEmitterExpressive → Queue

Static Member Summary

Static Public Members
public static get

expiry: *

returns the cut off in milliseconds ago for checking deadspace

Static Method Summary

Static Public Methods
public static

Creates a new instance of Queue

Constructor Summary

Public Constructor
public

creates a new Queue

Method Summary

Public Methods
public

attaches all relevant listeners and brings the Queue online

public

complete(job: Job): *

Completes a job in the Job table

public

enqueue(job: Job): *

Inserts a job to the Job table for processing later

public

error(job: Job): *

Stores a job as errored in the Job table

public

kill()

kills the Queue and removes anything that may cause a memory leak

public

schedule(job: Job): *

Schedules a job to run in an available thread

public

finds jobs and schedules them.

Inherited Summary

From class Expressive
public static

create(): *

creates a new inherited instance

public

debug: *

public

is(state: string): *

expressive emit

public

when(): *

expressive once

Static Public Members

public static get expiry: * source

returns the cut off in milliseconds ago for checking deadspace

Properties:

NameTypeAttributeDescription
expiry *

Static Public Methods

public static create(): Promise source

Creates a new instance of Queue

Override:

Expressive#create

Return:

Promise

resolves to the instance of Queue

Public Constructors

public constructor: Queue source

creates a new Queue

Override:

Expressive#constructor

Return:

Queue

Public Methods

public bringOnline(): * source

attaches all relevant listeners and brings the Queue online

Return:

*

public complete(job: Job): * source

Completes a job in the Job table

Params:

NameTypeAttributeDescription
job Job

The job

Return:

*

public enqueue(job: Job): * source

Inserts a job to the Job table for processing later

Params:

NameTypeAttributeDescription
job Job

The job to insert

Return:

*

public error(job: Job): * source

Stores a job as errored in the Job table

Params:

NameTypeAttributeDescription
job Job

The job

Return:

*

public kill() source

kills the Queue and removes anything that may cause a memory leak

public schedule(job: Job): * source

Schedules a job to run in an available thread

Params:

NameTypeAttributeDescription
job Job

The job to run

Return:

*

public work(): Promise source

finds jobs and schedules them. Triggered by Event.prototype.nextTick

Return:

Promise

{ description_of_the_return_value }