DittoPostgres: use pool size for number of CPU cores

This commit is contained in:
Alex Gleason 2024-05-06 11:44:33 -05:00
parent f4c02f1568
commit a3e54fdff4
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 4 additions and 3 deletions

View File

@ -16,9 +16,10 @@ export class DittoPostgres {
}, },
// @ts-ignore mismatched kysely versions probably // @ts-ignore mismatched kysely versions probably
createDriver() { createDriver() {
return new PostgreSQLDriver({ return new PostgreSQLDriver(
connectionString: Deno.env.get('DATABASE_URL'), { connectionString: Deno.env.get('DATABASE_URL') },
}); navigator.hardwareConcurrency,
);
}, },
createIntrospector(db: Kysely<unknown>) { createIntrospector(db: Kysely<unknown>) {
return new PostgresIntrospector(db); return new PostgresIntrospector(db);