Skip to content

Commit

Permalink
Move the pingInterval setting in to the root connection params.
Browse files Browse the repository at this point in the history
  • Loading branch information
garnertb committed Nov 3, 2023
1 parent 440a30a commit 91a79b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions middleware/initialize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -590,9 +590,8 @@ async function connectRedis(
port: config.redis.port ? Number(config.redis.port) : config.redis.tls ? 6380 : 6379,
password: config.redis.key,
tls: !!config.redis.tls,
pingInterval: 5 * 60 * 1000, // Ping Each 5min. https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-connection#idle-timeout
},
// name
pingInterval: 5 * 60 * 1000, // Ping Each 5min. https://learn.microsoft.com/en-us/azure/azure-cache-for-redis/cache-best-practices-connection#idle-timeout
};
debug(`connecting to ${purpose} Redis ${redisConfig.host || redisConfig.tls}`);
const redisClient: RedisClientType = createClient(redisOptions);
Expand Down

0 comments on commit 91a79b1

Please sign in to comment.