Type alias DatabaseQueueEvents<TPayload>

DatabaseQueueEvents<TPayload>: {
    activated: [{
        job: Job<TPayload>;
    }];
    completed: [{
        job: Job<TPayload>;
    }];
    error: [{
        error: Error;
    }];
    failed: [{
        error: Error;
        job: Job<TPayload>;
    }];
}

Events for the DatabaseQueue.

Type Parameters

  • TPayload

    The type of the job payload.

Type declaration

  • activated: [{
        job: Job<TPayload>;
    }]

    Event triggered when a job is activated.

  • completed: [{
        job: Job<TPayload>;
    }]

    Event triggered when a job is completed.

  • error: [{
        error: Error;
    }]

    Event triggered when an error occurs.

  • failed: [{
        error: Error;
        job: Job<TPayload>;
    }]

    Event triggered when a job fails.