diff --git a/src/repositories/RedisNotificationRepository.ts b/src/repositories/RedisNotificationRepository.ts index 6397140..a1522ed 100644 --- a/src/repositories/RedisNotificationRepository.ts +++ b/src/repositories/RedisNotificationRepository.ts @@ -4,9 +4,9 @@ import { NotificationRepository, ScheduledNotification } from "./NotificationRepository"; -import { createClient, RedisClientType } from "redis"; +import { createClient } from "redis"; -class RedisNotificationRepository implements NotificationRepository { +export class RedisNotificationRepository implements NotificationRepository { constructor( private redisClient = createClient({ url: process.env.REDIS_URL, @@ -21,6 +21,10 @@ class RedisNotificationRepository implements NotificationRepository { this.unsubscribeFromNotificationChanges = this.unsubscribeFromNotificationChanges.bind(this); } + get isReady() { + return this.redisClient.isReady + } + public async connect() { await this.redisClient.connect(); }