According to the documentation, creating a queue with a single connection string should work:
Queue(queueName, redisConnectionString, [redisOpts]).
Where: redisConnectionString {String} A connection string containing the redis server host, port and (optional) authentication.
However, when I do something like this, I get the error below:
var emailQueue = Queue('email-queue', 'redis://localhost:6379')
TypeError: Cannot create property 'host' on string '127.0.0.1'
at createClient (.../node_modules/redis/lib/createClient.js:40:30)
at Object.exports.createClient (.../node_modules/redis/index.js:1081:41)
at createClient (.../node_modules/bull/lib/queue.js:72:22)
at new Queue (.../node_modules/bull/lib/queue.js:88:17)
at Queue (.../node_modules/bull/lib/queue.js:52:12)
...
Looking at the code in queue.js, there is nowhere where the second parameter gets treated as a URL. Not sure if this is just not implemented or the documentation is just incorrect.
@innovative1 confirmed, having the same bug
+1 confirmed, having the same bug too plsss fix it soon as soon as possible plsssssss
@innovative1 @kurokochin I found workaround: try passing empty object as the last argument to Queue( call, eg. :
var emailQueue = Queue('email-queue', 'redis://localhost:6379', {})
This seems to be fixed, there is a passing unit test for it: https://github.com/OptimalBits/bull/blob/master/test/test_queue.js#L153-L169
Most helpful comment
@innovative1 @kurokochin I found workaround: try passing empty object as the last argument to
Queue(call, eg. :