bullmq - v5.56.2
    Preparing search index...

    Interface QueueEventsListener

    interface QueueEventsListener {
        active: (args: { jobId: string; prev?: string }, id: string) => void;
        added: (args: { jobId: string; name: string }, id: string) => void;
        cleaned: (args: { count: string }, id: string) => void;
        completed: (
            args: { jobId: string; prev?: string; returnvalue: string },
            id: string,
        ) => void;
        delayed: (args: { delay: number; jobId: string }, id: string) => void;
        drained: (id: string) => void;
        error: (args: Error) => void;
        failed: (
            args: { failedReason: string; jobId: string; prev?: string },
            id: string,
        ) => void;
        "ioredis:close": () => void;
        paused: (args: {}, id: string) => void;
        progress: (
            args: { data: number | object; jobId: string },
            id: string,
        ) => void;
        removed: (args: { jobId: string; prev: string }, id: string) => void;
        resumed: (args: {}, id: string) => void;
        "retries-exhausted": (
            args: { attemptsMade: string; jobId: string },
            id: string,
        ) => void;
        stalled: (args: { jobId: string }, id: string) => void;
        waiting: (args: { jobId: string; prev?: string }, id: string) => void;
        "waiting-children": (args: { jobId: string }, id: string) => void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    active: (args: { jobId: string; prev?: string }, id: string) => void

    Listen to 'active' event.

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

    added: (args: { jobId: string; name: string }, id: string) => void

    Listen to 'added' event.

    This event is triggered when a job is created.

    cleaned: (args: { count: string }, id: string) => void

    Listen to 'cleaned' event.

    This event is triggered when a cleaned method is triggered.

    completed: (
        args: { jobId: string; prev?: string; returnvalue: string },
        id: string,
    ) => void

    Listen to 'completed' event.

    This event is triggered when a job has successfully completed.

    delayed: (args: { delay: number; jobId: string }, id: string) => void

    Listen to 'delayed' event.

    This event is triggered when a job is delayed.

    drained: (id: string) => 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.

    error: (args: Error) => void

    Listen to 'error' event.

    This event is triggered when an exception is thrown.

    failed: (
        args: { failedReason: string; jobId: string; prev?: string },
        id: string,
    ) => void

    Listen to 'failed' event.

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

    "ioredis:close": () => void

    Listen to 'ioredis:close' event.

    This event is triggered when ioredis is closed.

    paused: (args: {}, id: string) => void

    Listen to 'paused' event.

    This event is triggered when a queue is paused.

    progress: (args: { data: number | object; jobId: string }, id: string) => 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.

    removed: (args: { jobId: string; prev: string }, id: string) => void

    Listen to 'removed' event.

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

    resumed: (args: {}, id: string) => void

    Listen to 'resumed' event.

    This event is triggered when a queue is resumed.

    "retries-exhausted": (
        args: { attemptsMade: string; jobId: string },
        id: string,
    ) => void

    Listen to 'retries-exhausted' event.

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

    stalled: (args: { jobId: string }, id: string) => 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.

    waiting: (args: { jobId: string; prev?: string }, id: string) => void

    Listen to 'waiting' event.

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

    "waiting-children": (args: { jobId: string }, id: string) => void

    Listen to 'waiting-children' event.

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