mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
waitReady is not actually needed
This commit is contained in:
parent
c50c63f954
commit
b3cfd5e12c
4 changed files with 0 additions and 4 deletions
|
|
@ -6,7 +6,6 @@ export interface DittoDatabase {
|
|||
readonly kysely: Kysely<DittoTables>;
|
||||
readonly poolSize: number;
|
||||
readonly availableConnections: number;
|
||||
readonly waitReady: Promise<void>;
|
||||
}
|
||||
|
||||
export interface DittoDatabaseOpts {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ export class DittoPglite {
|
|||
kysely,
|
||||
poolSize: 1,
|
||||
availableConnections: 1,
|
||||
waitReady: pglite.waitReady,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ export class DittoPostgres {
|
|||
get availableConnections() {
|
||||
return pg.connections.idle;
|
||||
},
|
||||
waitReady: Promise.resolve(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue