From b3cfd5e12cb579b6b6971da5313d37661b563ffa Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 12 Sep 2024 13:17:21 -0500 Subject: [PATCH] waitReady is not actually needed --- src/db/DittoDatabase.ts | 1 - src/db/adapters/DittoPglite.ts | 1 - src/db/adapters/DittoPostgres.ts | 1 - src/storages.ts | 1 - 4 files changed, 4 deletions(-) diff --git a/src/db/DittoDatabase.ts b/src/db/DittoDatabase.ts index 93c71a90..530d9391 100644 --- a/src/db/DittoDatabase.ts +++ b/src/db/DittoDatabase.ts @@ -6,7 +6,6 @@ export interface DittoDatabase { readonly kysely: Kysely; readonly poolSize: number; readonly availableConnections: number; - readonly waitReady: Promise; } export interface DittoDatabaseOpts { diff --git a/src/db/adapters/DittoPglite.ts b/src/db/adapters/DittoPglite.ts index 9b425c4b..3423cb31 100644 --- a/src/db/adapters/DittoPglite.ts +++ b/src/db/adapters/DittoPglite.ts @@ -21,7 +21,6 @@ export class DittoPglite { kysely, poolSize: 1, availableConnections: 1, - waitReady: pglite.waitReady, }; } } diff --git a/src/db/adapters/DittoPostgres.ts b/src/db/adapters/DittoPostgres.ts index 0300c3e0..f1a5bcc9 100644 --- a/src/db/adapters/DittoPostgres.ts +++ b/src/db/adapters/DittoPostgres.ts @@ -48,7 +48,6 @@ export class DittoPostgres { get availableConnections() { return pg.connections.idle; }, - waitReady: Promise.resolve(), }; } } diff --git a/src/storages.ts b/src/storages.ts index fb66c55e..15920444 100644 --- a/src/storages.ts +++ b/src/storages.ts @@ -25,7 +25,6 @@ export class Storages { if (!this._database) { this._database = (async () => { const db = DittoDB.create(Conf.databaseUrl, { poolSize: Conf.pg.poolSize }); - await db.waitReady; await DittoDB.migrate(db.kysely); return db; })();