Interface QueueEvents<JobReturnType, JobOptions>

interface QueueEvents<JobReturnType, JobOptions> {
    active: CustomEvent<any>;
    add: CustomEvent<any>;
    completed: CustomEvent<JobReturnType>;
    empty: CustomEvent<any>;
    error: CustomEvent<Error>;
    failure: CustomEvent<QueueJobFailure<JobReturnType, JobOptions>>;
    idle: CustomEvent<any>;
    next: CustomEvent<any>;
    success: CustomEvent<QueueJobSuccess<JobReturnType, JobOptions>>;
}

Type Parameters

Properties

active: CustomEvent<any>

A job is about to start running

add: CustomEvent<any>

A job was added to the queue

A job has finished successfully

empty: CustomEvent<any>

The queue is empty, jobs may be running

A job has failed

Emitted just after `"error", a job has failed - this event gives access to the job and the thrown error

idle: CustomEvent<any>

All jobs have finished and the queue is empty

next: CustomEvent<any>

A job has finished or failed

Emitted just after `"completed", a job has finished successfully - this event gives access to the job and it's result