Skip to content

[Bug]: getWorkers does not work with Redis Cluster #3340

@DamienVicet

Description

@DamienVicet

Version

v5.53.2

Platform

NodeJS

What happened?

The queue getter getWorkers does not work with Redis Cluster.

How to reproduce.

I made a fork to test this : https://github.com/DamienVicet/bullmq/tree/master

I launched a Redis Cluster in Docker with

docker compose -f docker-compose-cluster.yml up

Then I launched getWorkers tests :

yarn test './tests/test_getters.ts' -g '.getWorkers'

The method returns always no results, after digging a bit, in

? (<Redis>opts.connection).duplicate({ connectionName })
, connectionName is not passed to the options with Redis Cluster because the Cluster class of ioredis accepts it under redisOptions. The other problem is that CLIENT LIST is used to get the list of the workers, but with a cluster, this command runs only on one node, and I am not sure this is the right node that is used.

Relevant log output

Code of Conduct

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

Metadata

Metadata

Assignees

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