From 1e60ed665d14f80fad72daed4724948d7d9695ab Mon Sep 17 00:00:00 2001 From: mia Date: Thu, 10 Oct 2024 23:05:39 -0700 Subject: [PATCH] [backend] Use configured prefix for redis messaging --- packages/backend/src/db/redis.ts | 2 +- packages/backend/src/services/stream.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/db/redis.ts b/packages/backend/src/db/redis.ts index b07adcb50..40fed15df 100644 --- a/packages/backend/src/db/redis.ts +++ b/packages/backend/src/db/redis.ts @@ -17,6 +17,6 @@ export function createConnection() { } export const subscriber = createConnection(); -subscriber.subscribe(config.host); +subscriber.subscribe(config.redis.prefix ?? config.host); export const redisClient = createConnection(); diff --git a/packages/backend/src/services/stream.ts b/packages/backend/src/services/stream.ts index 8aef36788..6daf58064 100644 --- a/packages/backend/src/services/stream.ts +++ b/packages/backend/src/services/stream.ts @@ -37,7 +37,7 @@ class Publisher { : { type: type, body: value }; redisClient.publish( - config.host, + config.redis.prefix ?? config.host, JSON.stringify({ channel: channel, message: message,