Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/storage/RedisAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,25 @@ export default class RedisAdapter extends ioredis {
host: options.host,
port: options.port,
db: options.db,
password: options.pass
password: options.pass,
});
} else { // If it IS the string URL, that'll be the first param for ioredis.
result.unshift(options.url);
}
if (options.tls) {
merge(opts, {tls: options.tls});
}


return result;
}

/**
* Parses the options into what we care about.
*/
static _defineOptions({ connectionTimeout, operationTimeout, url, host, port, db, pass }) {
static _defineOptions({ connectionTimeout, operationTimeout, url, host, port, db, pass, tls }) {
const parsedOptions = {
connectionTimeout, operationTimeout, url, host, port, db, pass
connectionTimeout, operationTimeout, url, host, port, db, pass, tls
};

return merge({}, DEFAULT_OPTIONS, parsedOptions);
Expand Down
5 changes: 4 additions & 1 deletion src/utils/settings/storage/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const ParseStorageSettings = (settings) => {
db,
pass,
url,
tls,
connectionTimeout,
operationTimeout
} = options;
Expand Down Expand Up @@ -73,7 +74,9 @@ const ParseStorageSettings = (settings) => {
newOpts.db = db;
newOpts.pass = pass;
}

if (tls) {
newOpts.tls = tls;
}
return {
type,
prefix,
Expand Down