Skip to main content

Overview

JobProgress represents the progress of a job. It can be either a number (percentage) or an object with custom progress data.

Type Definition

Usage

Number Progress

Use a number (typically 0-100) to represent percentage completion:

Object Progress

Use an object for more detailed progress information:

Examples

Simple Percentage

Detailed Progress Object

Multi-Stage Progress

Listening to Progress

Worker Events

QueueEvents

Queue Instance

Best Practices

1. Update Progress Periodically

Don’t update too frequently:

2. Include Meaningful Information

3. Handle Progress Errors Gracefully

  • Job - Job class with updateProgress method
  • Worker - Worker class that emits progress events
  • QueueEvents - Listen to progress events