Getters

Job Counts

It is often necessary to know how many jobs are in a given group:

import { QueuePro } from '@taskforcesh/bullmq-pro';

const queue = new QueuePro('myQueue', { connection });
const groupId = 'my group';
const count = await queue.getGroupsJobsCount(1000); // 1000 groups in each iteration

This count value includes prioritized and non-prioritized jobs included groups.

Or if you want to get active jobs count for an specific group

const activeCount = await queue.getGroupActiveCount(groupId);

Get Jobs

It is also possible to retrieve the jobs with pagination style semantics in a given group. For example:

const jobs = await queue.getGroupJobs(groupId, 0, 100);

Read more:

Last updated

Copyright (c) Taskforce.sh Inc.