Skip to content

Commit

Permalink
Merge pull request #1400 from argos-ci/fix-rediss
Browse files Browse the repository at this point in the history
fix: heroku redis config
  • Loading branch information
jsfez authored Oct 17, 2024
2 parents 9b343a3 + 05b0be5 commit 83daf0a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/backend/src/util/redis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ import logger from "@/logger/index.js";

import { createRedisLock } from "./lock.js";

export const redisClient = createClient({ url: config.get("redis.url") });
export const redisClient = createClient({
url: config.get("redis.url"),
socket: {
tls: config.get("redis.url").match(/rediss:/) != null,
rejectUnauthorized: false,
},
});
redisClient.on("error", (error: unknown) => {
// Ignore these errors, Redis will automatically reconnect
if (error instanceof ConnectionTimeoutError) {
Expand Down

0 comments on commit 83daf0a

Please sign in to comment.