Skip to content

[Bug]: Redis: SORTED SET: waiting is not created #3849

Description

@rj-au

Version

v7.42.1

Platform

NodeJS

What happened?

We're on "@taskforcesh/bullmq-pro": "^7.42.1"

When I add jobs as delayed or jobs are completed, their count can be retrieved by the Bullmq-pro SDK/API, and Redis has a SORTED SET: completed and SORTED SET: delayed.

Problem:
When I create jobs that default to "waiting/wait" there is no SORTED SET: waiting in Redis. Calling the BullMQ-pro SDK/API returns zero jobtypes in "waiting".
But if I get the details for a job that I have just queued, the state is shown as "waiting"

Should there be a SORTED SET: waiting record for the Queue in Redis?
Otherwise the only other place I can see that the "waiting" jobs can be found would be from the STREAM: bull:QUEUE_NAME:events object in Redis, but that would be inefficient.

Image

How to reproduce.

  1. Create some jobs on a queue, with no Worker running
  2. Call queue.getWaiting() or queue.getJobCountByTypes(['waiting']) or queue.getJobCounts()`

All these bullmq SDK/API commands/functions return zero for "waiting"

Relevant log output

Created some jobs:

{
  "testadd": [
    "251",
    "252",
    "253",
    "254",
    "255",
    "256",
    "257",
    "258",
    "259",
    "260"
  ]
}


queue.getJobCounts():

{
  "jobscount": {
    "active": 0,
    "completed": 164,
    "delayed": 0,
    "failed": 0,
    "paused": 0,
    "prioritized": 0,
    "waiting": 0,
    "waiting-children": 0
  }
}


queue.getJob("260"):

{
  "jobs": [
    {
      "id": "260",
      "name": "test-1720-9",
      "state": "waiting",
      "createdAt": "2026-03-04T17:20:41.431+10:00",
      "progress": 0,
      "delay": 0,
      "attemptsStarted": 0,
      "stalledCounter": 0,
      "attemptsMade": 0
    }
  ]
}

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions