From bb40b577d73e725244c8a081aa3f0241d148dece Mon Sep 17 00:00:00 2001 From: Manuel Astudillo Date: Thu, 29 Feb 2024 19:59:15 +0100 Subject: [PATCH] fix(config): use the more standard REDIS_URL env instead of REDIS_URI --- src/config.ts | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index b9e2b7a..e791e79 100644 --- a/src/config.ts +++ b/src/config.ts @@ -4,7 +4,7 @@ export const config = { defaultQueuePrefix: process.env.QUEUE_PREFIX || "bull", port: parseInt(process.env.PORT || "8080", 10), redis: { - uri: process.env.REDIS_URI || undefined, + url: process.env.REDIS_URL || undefined, host: process.env.REDIS_HOST || "localhost", port: process.env.REDIS_PORT ? parseInt(process.env.REDIS_PORT, 10) : 6379, username: process.env.REDIS_USERNAME || undefined, diff --git a/src/index.ts b/src/index.ts index 9600ee0..0a1059a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -9,8 +9,8 @@ const pkg = require("../package.json"); let connection: Redis | Cluster; -if (config.redis.uri) { - connection = new IORedis(config.redis.uri, { +if (config.redis.url) { + connection = new IORedis(config.redis.url, { retryStrategy: () => 1000, maxRetriesPerRequest: null, });