Jobs' actions

There are several actions that can be performed on jobs that are inside a given queue. Specifically there are 2 types of actions: actions that can be performed from the worker when processing a given job, and actions that can be performed while a job is not being processed.

When a job is being processed, there are two operations available that can be performed on the job: update its progress and add logs. Both operations are fully optional and their use depends on what kind of jobs we are processing. For example, if it is a heavy job like transcoding a video, we may be interested in updating the jobs progress so that we can check with a queue dashboard or programmatically, the status of a given job. Similarly, if we want to help in debugging a jobs processing we may want to add some logs to the job, so that we can then see exactly what happened during its processing.

There are other actions that can be performed on jobs that are not currently being processed, for example, deleting a job, promoting a delayed job so that it is processed sooner than its delay time, manually retrying a failed job among others. These types of actions are normally suitable for dashboards or BullMQ frontends, as they are difficult to apply in practice programmatically. Still, as there are use cases when they are needed, we provide an API for them too.

Last updated