Skip to content

Commit

Permalink
fix(redis): redis connection not opened
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed May 13, 2024
1 parent 3ab8444 commit 853e2e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 853e2e6

Please sign in to comment.