Interface QueueListener<JobBase>

interface QueueListener<JobBase> {
    cleaned: ((jobs, type) => void);
    error: ((err) => void);
    ioredis:close: (() => void);
    paused: (() => void);
    progress: ((job, progress) => void);
    removed: ((job) => void);
    resumed: (() => void);
    waiting: ((job) => void);
}

Type Parameters

Hierarchy (view full)

Properties

cleaned: ((jobs, type) => void)

Listen to 'cleaned' event.

This event is triggered when the queue calls clean method.

Type declaration

    • (jobs, type): void
    • Listen to 'cleaned' event.

      This event is triggered when the queue calls clean method.

      Parameters

      • jobs: string[]
      • type: string

      Returns void

error: ((err) => void)

Listen to 'error' event.

This event is triggered when an error is thrown.

Type declaration

    • (err): void
    • Listen to 'error' event.

      This event is triggered when an error is thrown.

      Parameters

      • err: Error

      Returns void

ioredis:close: (() => void)

Listen to 'ioredis:close' event.

This event is triggered when ioredis is closed.

Type declaration

    • (): void
    • Listen to 'ioredis:close' event.

      This event is triggered when ioredis is closed.

      Returns void

paused: (() => void)

Listen to 'paused' event.

This event is triggered when the queue is paused.

Type declaration

    • (): void
    • Listen to 'paused' event.

      This event is triggered when the queue is paused.

      Returns void

progress: ((job, progress) => void)

Listen to 'progress' event.

This event is triggered when the job updates its progress.

Type declaration

    • (job, progress): void
    • Listen to 'progress' event.

      This event is triggered when the job updates its progress.

      Parameters

      • job: JobBase
      • progress: number | object

      Returns void

removed: ((job) => void)

Listen to 'removed' event.

This event is triggered when a job is removed.

Type declaration

    • (job): void
    • Listen to 'removed' event.

      This event is triggered when a job is removed.

      Parameters

      Returns void

resumed: (() => void)

Listen to 'resumed' event.

This event is triggered when the queue is resumed.

Type declaration

    • (): void
    • Listen to 'resumed' event.

      This event is triggered when the queue is resumed.

      Returns void

waiting: ((job) => void)

Listen to 'waiting' event.

This event is triggered when the queue creates a new job.

Type declaration

    • (job): void
    • Listen to 'waiting' event.

      This event is triggered when the queue creates a new job.

      Parameters

      Returns void

Generated using TypeDoc