From 2e727abd3c2927fc09e4b550491173524d4cac69 Mon Sep 17 00:00:00 2001 From: felixng Date: Mon, 15 Apr 2024 01:24:12 -0400 Subject: [PATCH] fix: redis connection --- src/infra/redis.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/infra/redis.ts b/src/infra/redis.ts index 52ff702..06f4844 100644 --- a/src/infra/redis.ts +++ b/src/infra/redis.ts @@ -24,13 +24,13 @@ if (process.env.NODE_ENV === 'production') { redis = global.redis; } -if (process.env.NEXT_PHASE !== PHASE_PRODUCTION_BUILD && !redis.isOpen) { - redis - .on('error', async (err) => { - await errorHandler.handleError(err); - }) - .on('ready', () => logger.info('Redis Client Ready')) - .connect(); -} +// if (process.env.NEXT_PHASE !== PHASE_PRODUCTION_BUILD && !redis.isOpen) { +// redis +// .on('error', async (err) => { +// await errorHandler.handleError(err); +// }) +// .on('ready', () => logger.info('Redis Client Ready')) +// .connect(); +// } export { redis };