Interface QueueEventsListenerPro

Hierarchy

Properties

active: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'active' event.

      This event is triggered when a job enters the 'active' state.

      Parameters

      • args: {
            jobId: string;
            prev?: string;
        }
        • jobId: string
        • Optional prev?: string
      • id: string

      Returns void

added: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'added' event.

      This event is triggered when a job is created.

      Parameters

      • args: {
            data: string;
            jobId: string;
            name: string;
            opts: string;
        }
        • data: string
        • jobId: string
        • name: string
        • opts: string
      • id: string

      Returns void

cleaned: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'cleaned' event.

      This event is triggered when a cleaned method is triggered.

      Parameters

      • args: {
            count: string;
        }
        • count: string
      • id: string

      Returns void

completed: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'completed' event.

      This event is triggered when a job has successfully completed.

      Parameters

      • args: {
            jobId: string;
            prev?: string;
            returnvalue: string;
        }
        • jobId: string
        • Optional prev?: string
        • returnvalue: string
      • id: string

      Returns void

delayed: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'delayed' event.

      This event is triggered when a job is delayed.

      Parameters

      • args: {
            delay: number;
            jobId: string;
        }
        • delay: number
        • jobId: string
      • id: string

      Returns void

drained: ((id) => void)

Type declaration

    • (id): void
    • Listen to 'drained' event.

      This event is triggered when the queue has drained the waiting list. Note that there could still be delayed jobs waiting their timers to expire and this event will still be triggered as long as the waiting list has emptied.

      Parameters

      • id: string

      Returns void

error: ((args) => void)

Type declaration

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

      This event is triggered when an exception is thrown.

      Parameters

      • args: Error

      Returns void

failed: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'failed' event.

      This event is triggered when a job has thrown an exception.

      Parameters

      • args: {
            failedReason: string;
            jobId: string;
            prev?: string;
        }
        • failedReason: string
        • jobId: string
        • Optional prev?: string
      • id: string

      Returns void

groups:paused: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'groups:paused' event.

      This event is triggered when a group is paused.

      Parameters

      • args: {
            groupId: string;
        }
        • groupId: string
      • id: string

      Returns void

groups:resumed: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'groups:resumed' event.

      This event is triggered when a group is resumed.

      Parameters

      • args: {
            groupId: string;
        }
        • groupId: string
      • id: string

      Returns void

ioredis:close: (() => void)

Type declaration

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

      This event is triggered when ioredis is closed.

      Returns void

paused: ((args, id) => void)

Type declaration

    • (args, id): void
    • Listen to 'paused' event.

      This event is triggered when a queue is paused.

      Parameters

      • args: {}
        • id: string

        Returns void

    progress: ((args, id) => void)

    Type declaration

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

        This event is triggered when a job updates it progress, i.e. the Job##updateProgress() method is called. This is useful to notify progress or any other data from within a processor to the rest of the world.

        Parameters

        • args: {
              data: number | object;
              jobId: string;
          }
          • data: number | object
          • jobId: string
        • id: string

        Returns void

    removed: ((args, id) => void)

    Type declaration

      • (args, id): void
      • Listen to 'removed' event.

        This event is triggered when a job has been manually removed from the queue.

        Parameters

        • args: {
              jobId: string;
              prev: string;
          }
          • jobId: string
          • prev: string
        • id: string

        Returns void

    resumed: ((args, id) => void)

    Type declaration

      • (args, id): void
      • Listen to 'resumed' event.

        This event is triggered when a queue is resumed.

        Parameters

        • args: {}
          • id: string

          Returns void

      retries-exhausted: ((args, id) => void)

      Type declaration

        • (args, id): void
        • Listen to 'retries-exhausted' event.

          This event is triggered when a job has retried the maximum attempts.

          Parameters

          • args: {
                attemptsMade: string;
                jobId: string;
            }
            • attemptsMade: string
            • jobId: string
          • id: string

          Returns void

      stalled: ((args, id) => void)

      Type declaration

        • (args, id): void
        • Listen to 'stalled' event.

          This event is triggered when a job has been moved from 'active' back to 'waiting'/'failed' due to the processor not being able to renew the lock on the said job.

          Parameters

          • args: {
                jobId: string;
            }
            • jobId: string
          • id: string

          Returns void

      waiting: ((args, id) => void)

      Type declaration

        • (args, id): void
        • Listen to 'waiting' event.

          This event is triggered when a job enters the 'waiting' state.

          Parameters

          • args: {
                jobId: string;
                prev?: string;
            }
            • jobId: string
            • Optional prev?: string
          • id: string

          Returns void

      waiting-children: ((args, id) => void)

      Type declaration

        • (args, id): void
        • Listen to 'waiting-children' event.

          This event is triggered when a job enters the 'waiting-children' state.

          Parameters

          • args: {
                jobId: string;
            }
            • jobId: string
          • id: string

          Returns void

      Generated using TypeDoc