Skip to content

Commit

Permalink
fix(queue): check redisOptions is available fixes #2186
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Dec 14, 2021
1 parent 57f24df commit 9bb078b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/queue.js
Expand Up @@ -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);
}

Expand Down

0 comments on commit 9bb078b

Please sign in to comment.