Skip to content

Commit

Permalink
fix(config): use the more standard REDIS_URL env instead of REDIS_URI
Browse files Browse the repository at this point in the history
  • Loading branch information
manast committed Feb 29, 2024
1 parent 8d5edec commit bb40b57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
Expand Down

0 comments on commit bb40b57

Please sign in to comment.