From 853e2e627e9358eb60fa66ec24dfcc258eb587ce Mon Sep 17 00:00:00 2001 From: Gerald Baulig Date: Mon, 13 May 2024 18:40:39 +0200 Subject: [PATCH] fix(redis): redis connection not opened --- src/worker.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/worker.ts b/src/worker.ts index 58a41ee..16bda92 100644 --- a/src/worker.ts +++ b/src/worker.ts @@ -182,9 +182,11 @@ export class Worker { this.events = new Events(kafkaCfg, logger); await this.events.start(); this.offsetStore = new OffsetStore(this.events, cfg, logger); + const redisConfig = cfg.get('redis'); redisConfig.db = this.cfg.get('redis:db-indexes:db-subject'); this.redisClient = createClient(redisConfig); + await this.redisClient.connect(); await Promise.all(Object.keys(kafkaCfg.topics).map(async key => { const topicName = kafkaCfg.topics[key].topic;