bee-queue
bee-queue copied to clipboard
Problem when creating BeeQueue use node-redis
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
node-redis v4 is not yet supported, sorry.