Interface QueueListener<DataType, ResultType, NameType>

interface QueueListener<DataType, ResultType, NameType> {
    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

  • DataType
  • ResultType
  • NameType extends string

Hierarchy (view full)

Properties

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

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)

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)

Type declaration

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

      This event is triggered when ioredis is closed.

      Returns void

paused: (() => void)

Type declaration

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

      This event is triggered when the queue is paused.

      Returns void

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

Type declaration

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

      This event is triggered when the job updates its progress.

      Parameters

      • job: Job<DataType, ResultType, NameType>
      • progress: number | object

      Returns void

removed: ((job) => void)

Type declaration

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

      This event is triggered when a job is removed.

      Parameters

      • job: Job<DataType, ResultType, NameType>

      Returns void

resumed: (() => void)

Type declaration

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

      This event is triggered when the queue is resumed.

      Returns void

waiting: ((job) => void)

Type declaration

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

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

      Parameters

      • job: Job<DataType, ResultType, NameType>

      Returns void

Generated using TypeDoc