From 071c51d16db58ed9f71138058dbbc25f73383e56 Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Tue, 14 Dec 2021 12:59:12 +0800 Subject: [PATCH] fix(queue): check redisOptions is available fixes #2186 --- lib/queue.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/queue.js b/lib/queue.js index 569c579f0..6b068d544 100755 --- a/lib/queue.js +++ b/lib/queue.js @@ -285,10 +285,9 @@ function redisClientGetter(queue, options, initCallback) { clientOptions.connectionName = this.clientName(); const client = (connections[type] = createClient(type, clientOptions)); - if ( - client.options.enableReadyCheck || - client.options.maxRetriesPerRequest - ) { + const opts = client.options.redisOptions || client.options; + + if (opts.enableReadyCheck || opts.maxRetriesPerRequest) { throw new Error(errors.Messages.MISSING_REDIS_OPTS); }