JS linting

This commit is contained in:
Gabriel Simmer 2024-03-15 21:10:56 +00:00
parent 7b7bf58a4c
commit 8ef6588749
No known key found for this signature in database
1 changed files with 11 additions and 11 deletions

View File

@ -245,7 +245,7 @@ const redisConfigFromEnv = (env) => {
let redisDatabase = parseIntFromEnv(env.REDIS_DB, 0, 'REDIS_DB');
/** @type {import('ioredis').RedisOptions} */
const redisParams = {
let redisParams = {
host: env.REDIS_HOST || '127.0.0.1',
port: redisPort,
db: redisDatabase,
@ -253,16 +253,16 @@ const redisConfigFromEnv = (env) => {
};
if (env.REDIS_SENTINEL) {
redisParams = {
password: env.REDIS_PASSWORD || undefined,
sentinels: env.REDIS_SENTINEL.split(',').map(h => {
const s = h.split(':');
const host = s[0] || '127.0.0.1';
const port = s[1] || '26379';
return { "host": host, "port": port };
}),
name: env.REDIS_SENTINEL_MASTER || 'mymaster',
};
redisParams = {
password: env.REDIS_PASSWORD || undefined,
sentinels: env.REDIS_SENTINEL.split(',').map(h => {
const s = h.split(':');
const host = s[0] || '127.0.0.1';
const port = s[1] || '26379';
return { "host": host, "port": port };
}),
name: env.REDIS_SENTINEL_MASTER || 'mymaster',
};
}
// redisParams.path takes precedence over host and port.