waitReady is not actually needed

This commit is contained in:
Alex Gleason 2024-09-12 13:17:21 -05:00
parent c50c63f954
commit b3cfd5e12c
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 0 additions and 4 deletions

View file

@ -6,7 +6,6 @@ export interface DittoDatabase {
readonly kysely: Kysely<DittoTables>;
readonly poolSize: number;
readonly availableConnections: number;
readonly waitReady: Promise<void>;
}
export interface DittoDatabaseOpts {

View file

@ -21,7 +21,6 @@ export class DittoPglite {
kysely,
poolSize: 1,
availableConnections: 1,
waitReady: pglite.waitReady,
};
}
}

View file

@ -48,7 +48,6 @@ export class DittoPostgres {
get availableConnections() {
return pg.connections.idle;
},
waitReady: Promise.resolve(),
};
}
}

View file

@ -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;
})();