Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when creating BeeQueue use node-redis #728

Open
modcrafts opened this issue Nov 19, 2023 · 1 comment
Open

Problem when creating BeeQueue use node-redis #728

modcrafts opened this issue Nov 19, 2023 · 1 comment

Comments

@modcrafts
Copy link

Problem

When creating a BeeQueue use { redis: createClient({ url: 'redis-url' }) }

BeeQueue still try to connect the redis using default config redis://127.0.0.1:6379

Reproduce

code

import { createClient } from "redis";
import BeeQueue from "bee-queue";

const client = createClient({ url: "redis://127.0.0.1:6380" })

const queue = new BeeQueue('SOMETHING', {
    redis: client
})

queue.createJob('data').save().then(j => {
    console.log(j)
})

result

node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: connect ECONNREFUSED 127.0.0.1:6379
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16) {
  errno: -4078,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 6379
}

Version

"bee-queue": "^1.7.1"
"redis": "^4.6.10"

Node version: Node.js v18.18.0
Also Reproduced on Node v20

@compwright
Copy link
Collaborator

node-redis v4 is not yet supported, sorry.

@compwright compwright added this to the 2.0.0 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants