From 258ea803bc20020c49e20d0a81342e548d2de299 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Fri, 17 Nov 2023 16:37:00 +0000 Subject: [PATCH] Further PR comments. --- packages/backend-core/src/redis/init.ts | 2 +- packages/worker/src/index.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/backend-core/src/redis/init.ts b/packages/backend-core/src/redis/init.ts index 9ec3246fac..f3bcee3209 100644 --- a/packages/backend-core/src/redis/init.ts +++ b/packages/backend-core/src/redis/init.ts @@ -11,7 +11,7 @@ let userClient: Client, inviteClient: Client, passwordResetClient: Client -async function init() { +export async function init() { userClient = await new Client(utils.Databases.USER_CACHE).init() sessionClient = await new Client(utils.Databases.SESSIONS).init() appClient = await new Client(utils.Databases.APP_METADATA).init() diff --git a/packages/worker/src/index.ts b/packages/worker/src/index.ts index 34dc90ccd6..1c7591a7e8 100644 --- a/packages/worker/src/index.ts +++ b/packages/worker/src/index.ts @@ -88,8 +88,7 @@ const shutdown = () => { export default server.listen(parseInt(env.PORT || "4002"), async () => { console.log(`Worker running on ${JSON.stringify(server.address())}`) await initPro() - await redis.clients.getInviteClient() - await redis.clients.getPasswordResetClient() + await redis.clients.init() // configure events to use the pro audit log write // can't integrate directly into backend-core due to cyclic issues await events.processors.init(proSdk.auditLogs.write)